Re: [algogeeks] Re: number of 1's

2010-07-04 Thread Rahul Kushwaha
@ashish : you are correct but the number of bits in the integer datatype is fixed while using anding algo.. but the looping algorithm is valid for any number of bit in the integer.. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to t

Re: [algogeeks] Re: C declaration

2010-07-04 Thread Rahul Kushwaha
this type of error is prominent in turbo c compilers.. but above mentioned c99,gcc and many other allow mixing of declarations.. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.c

Re: [algogeeks] Re: number of 1's

2010-07-04 Thread Rahul Kushwaha
no of bits set int v; int c; for(c=0;v;c++) v&=v-1; this is best method without consideration of no of bits in an integer and for executes only the number of times the bit is set in the number// -- You received this message because you are subscribed to the Google Groups "Algorithm

Re: [algogeeks] 2_D matrix

2010-07-02 Thread Rahul Kushwaha
i think this might work Binsearch on matrix for the column in which the element may lie... use last element of the coloumn for comparisons \ then binsearch in the coloumn to find if the element is there or not -- You received this message because you are subscribed to the Google Groups "

Re: [algogeeks] c array

2010-06-12 Thread Rahul Kushwaha
#include int main() { char str[7]="strings"; printf("%s\n",str); return 0; } it is showing error on code block and dev cpp also... this is an error no doubt. also mentioned in denis m ritchie -- You received this message because you are subscribed to the Google Groups "Algorithm G

[algogeeks] topic:modified Apriori algorithm for taking quantitative input values

2010-03-05 Thread Rahul Kushwaha
modified Apriori algorithm for taking quantitative input values so that the algo takes 1 2 34 45 12 4 44 32 as input instead of 1 1 0 0 1 1 0 0 0 1 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge.

Re: [algogeeks] Alternative Dta Structures for Cache Inefficient Linked Lists

2010-02-18 Thread Rahul Kushwaha
ya i also have thot on the same lines and when the fixed malloc block is full with data we can realloc() any better idea..?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@google

[algogeeks] Re: REGULAR & WEEKEND CORPORATE TRAINING BATCHS on Java/J2ee, Struts, EJB, Hibernate, XML for FRESHE R’S, B.E/B.Tech, MCA, M.Tech, M.Sc, BCA, B.Sc.

2009-04-29 Thread Rahul Kushwaha
hello dear, i just wanted to ask if your company provides training in delhi also. Reply as soon as possible 2009/4/27 ravi > > Our company is a corporate training and resource provider company > based in Bangalore. we are in to the field of corporate training > recently we are providing traini

[algogeeks] Re: find the output

2009-01-07 Thread Rahul Kushwaha
this code produces DANGLING REFERENCES coz buffer points to a location that does not exist \after execution of return statement... On Tue, Jan 6, 2009 at 2:48 AM, tania hamid wrote: > > > Plz indicate the output of the following code and explain why is it so.. > > > *char *modify (char *s) >

[algogeeks] Re: Lucky numbers

2009-01-07 Thread Rahul Kushwaha
can anybody tell me which is best and correct solution On Tue, Jan 6, 2009 at 12:30 AM, Karthik Singaram Lakshmanan < karthiksinga...@gmail.com> wrote: > > Its not clear that just a primality test would close the deal...The > sequence 1,3,7,13...does not have 5 which is prime. > If you consider a