Re: [algogeeks] zero sum subarray

2010-11-06 Thread sharad kumar
keep storing the elements in hash.. now keep adding the elements of array is the sum is -ve calculate -(-sum) ans search in hash. lllrly do it for +ve... O(n) in space and O(n) time i guess On Sat, Nov 6, 2010 at 7:21 PM, MAC wrote: > an array contain +ve and -ve element, find subarray whose sum

[algogeeks] zero sum subarray

2010-11-06 Thread MAC
an array contain +ve and -ve element, find subarray whose sum is 0 -- thanks --mac -- 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 t