No, it is not.
Read carefully the article on Wikipedia. There is a very detailed
explanation of the algorithm.
Heap is build in an array being sorted. It's the strongest feature of
the algorithm.



On Nov 9, 4:51 pm, "Pramod Negi" <[EMAIL PROTECTED]> wrote:
> i think if array of n elements is given and to make a heap out of it we need
> O(n) space.
> heap sort will surely take constant amount of auxially space if heap is
> already build.
>
> isn't it?
> correct me if i m wrong..
>
> On 11/9/07, Andrey <[EMAIL PROTECTED]> wrote:
>
>
>
> > Heapsorthttp://en.wikipedia.org/wiki/Heapsort#Comparison_with_other_sorts
>
> > On Nov 9, 3:54 pm, "Pramod Negi" <[EMAIL PROTECTED]> wrote:
> > > which algo sort array in O(N lgN) without extra space??????
>
> > > On 11/6/07, Andrey <[EMAIL PROTECTED]> wrote:
>
> > > > dor is absolutely right
>
> > > > > O(N*log(N)) is straightforward.. sort the array in O(N*log(N)) and
> > > > > then remove duplicates in linear time.
>
> > > > it doesn't need any extra memory.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to