I guess you could use Kadane's algo replacing addition with
multiplication.
http://en.wikipedia.org/wiki/Maximum_subarray_problem

On Sep 30, 8:08 am, Abhishek Kumar Singh <iiita2007...@gmail.com>
wrote:
> 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 this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to