[algogeeks] Re: Find the Max from each sub-array of size k

2011-09-02 Thread amit chandel
we can do it using max heap -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more

Re: [algogeeks] Re: Find the Max from each sub-array of size k

2011-09-02 Thread sukran dhawan
for(i=0;in;i++) { max = a[i]; for(j=1;jk;j++) { if(max a[j]) max = a[j]; } //print } On Fri, Sep 2, 2011 at 1:57 PM, amit chandel samit.iiit...@gmail.comwrote: we can do it using max heap -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group.

[algogeeks] Re: Find the Max from each sub-array of size k Options

2011-09-02 Thread icy`
I apologize to the group; i meant to post as reply to Find the Max from each sub-array of size k but I accidentally selected the word Options as well. Sorry. On Sep 2, 3:42 pm, icy` vipe...@gmail.com wrote: comparison/benchmarks of the 1) naive method, which just calls max with every new