[algogeeks] Re: Amazon Interview Q

2011-08-18 Thread Vijay Kansal
We should return curr-next in the last statement of ur code On Aug 18, 7:08 am, Dipankar Patro dip10c...@gmail.com wrote: A slight change in above code: make it while(cur cur-next) ^^ other wise the code will crash at last element in a prefect list, with no loop. On 18 August 2011 07:36,

[algogeeks] Re: Number theory

2011-08-17 Thread Vijay Kansal
@nitin it must be 2^n i think On Aug 17, 3:48 am, Bharat Kul Ratan bharat.kra...@gmail.com wrote: It might be useful:http://www.artofproblemsolving.com/Wiki/index.php/Partition_%28combin... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group.

[algogeeks] Re: Number theory

2011-08-17 Thread Vijay Kansal
my bad 2^(n-1)... On Aug 17, 2:17 pm, Vijay Kansal vijaykans...@gmail.com wrote: @nitin it must be 2^n i think On Aug 17, 3:48 am, Bharat Kul Ratan bharat.kra...@gmail.com wrote: It might be useful:http://www.artofproblemsolving.com/Wiki/index.php/Partition_%28combin... -- You