Jump to content

need help

- - - - -

  • Please log in to reply
9 replies to this topic

#1
salakin

salakin

    Newbie

  • Members
  • Pip
  • 4 posts
can anyone explain heap sort briefly .......

#2
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
I suppose you would first need to understand what a heap is: Heap (data structure) - Wikipedia, the free encyclopedia
Latinamne loqueris?

#3
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
Heap is basically an address space, somewhere in memory, used for program(/s) to allocate memory; I'm not sure if it's used for opening files, making new sockets, or other uses, though.

#4
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
Actually the heap I am referring to isn't what you are thinking of. Its a type of tree, where each child node has a lower value then its parent.
Latinamne loqueris?

#5
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
The stack?

#6
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
A heap is a data structure, think like a balanced tree, only different. I haven't studied it, so won't say much beyond that.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#7
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
Do you mean a binary tree? What's balanced?

#8
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
A heap is a tree based data structure. Not necessarily a type of binary tree, but it could possibly fall under that category as well.
Latinamne loqueris?

#9
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
Balanced means it has the same number of branches within every branch?

This is different from the type of heap operating systems use, right?

#10
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
No, balanced means it attempts to keep its height low. And yes, it is different than the "heap" used in reference to memory.
Latinamne loqueris?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users