[algogeeks] Find the max element of sets of size K

2013-09-10 Thread kumar raja
suppose we have n numbers and k =n. Then a1,a2... ak is one set. then a2,a3 ak+1 is other set. ... so totally we can have n-k+1 sets. how to figure out the maximum elements of all these k size sets with least possible time complexity and space complexity? -- You received this message

Re: [algogeeks] Find the max element of sets of size K

2013-09-10 Thread Aaquib Javed
http://www.geeksforgeeks.org/maximum-of-all-subarrays-of-size-k/ On Tue, Sep 10, 2013 at 11:46 PM, kumar raja rajkumar.cs...@gmail.comwrote: suppose we have n numbers and k =n. Then a1,a2... ak is one set. then a2,a3 ak+1 is other set. ... so totally we can have n-k+1 sets. how to