for(i=0;i<n;i++)
{
max = a[i];
for(j=1;j<k;j++)
{
if(max < a[j])
max = a[j];
}
//print
}
On Fri, Sep 2, 2011 at 1:57 PM, amit chandel <[email protected]>wrote:
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.