[algogeeks] Longest Contiguous Subarray with average = k

2011-12-24 Thread top coder
Consider an array of N integers. Find the longest contiguous subarray so that the average of its elements is greater than a given number k I know the general brute force solution in O(N^2). Is there any efficient solution using extra space? -- You received this message because you are

Re: [algogeeks] Longest Contiguous Subarray with average = k

2011-12-24 Thread atul anand
http://groups.google.com/group/algogeeks/browse_thread/thread/ed7295fbe2009b2/54665b73e297d752?hl=enq=Sub-array+problemlnk=ol; hope this link would help to find solution for the given problem. On Sat, Dec 24, 2011 at 9:41 PM, top coder topcode...@gmail.com wrote: Consider an array of N