[algogeeks] Yahoo coding round question

2010-10-19 Thread Abhishek Kumar Singh
Given an array of length N. How will you find the minimum length contiguous sub - array of whose sum is S and whose product is P . Here S and P will be given to you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

[algogeeks] How will you find the subarray whose product is k in an array of negative and positive numbers

2010-09-30 Thread Abhishek Kumar Singh
How will you find the subarray whose product is k in an array of negative and positive numbers efficient algorithm is to be considered, it will be better if time complexity is O(n) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to

[algogeeks] Re: Amazon: sort array

2010-07-12 Thread Abhishek Kumar Singh
);         return 0; } On Mon, Jul 12, 2010 at 10:20 AM, Abhishek Kumar Singh iiita2007...@gmail.com wrote: @souravsain for input {10,20,30,40,50,23,27}; ur output is coming  10, 20, 23, 27, 40, 30, 50, which not SORTED array. On Jul 10, 6:19 pm, souravsain souravs...@gmail.com wrote

[algogeeks] Re: Amazon: sort array

2010-07-11 Thread Abhishek Kumar Singh
@souravsain for input {10,20,30,40,50,23,27}; ur output is coming 10, 20, 23, 27, 40, 30, 50, which not SORTED array. On Jul 10, 6:19 pm, souravsain souravs...@gmail.com wrote: @Jitendra I have run the code with input given by you and found that it works well. Please have a look