Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › working heapsort [solved]
New Posts  All Forums:Forum Nav:

working heapsort [solved]

post #1 of 3
Thread Starter 
Hey quick question for anyone willing to help. Ive implemented a heapsort in java, and i got it to work for the most part except the first number in my output is not sorted so i'm thinking im close but not 100% there. Here is my implementation:

thanks i think it's prob im just shy one comparison but idk where i would be!
Edited by protzman - 12/7/12 at 4:30pm
post #2 of 3
Not sure what your "sink" method does, but it's not being called in the for loop in heapsort(). "length" is 0, so that for loop will never execute, perhaps that might be a problem?
Hackintosh
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 3770K MSI Z77 MPower Asus GTX 670 DCII G.SKILL Ares 2x4GB 
Hard DriveCoolingOSOS
Samsung 830 SSD NZXT Havik 140 Mac OSX 10.8 Windows 8 Professional 
MonitorKeyboardPowerCase
Yamakasi Catleap Q270 Logitech G510 Seasonic X750 Corsair 500R 
MouseAudio
Logitech G9x Logitech Z623 
  hide details  
Reply
Hackintosh
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 3770K MSI Z77 MPower Asus GTX 670 DCII G.SKILL Ares 2x4GB 
Hard DriveCoolingOSOS
Samsung 830 SSD NZXT Havik 140 Mac OSX 10.8 Windows 8 Professional 
MonitorKeyboardPowerCase
Yamakasi Catleap Q270 Logitech G510 Seasonic X750 Corsair 500R 
MouseAudio
Logitech G9x Logitech Z623 
  hide details  
Reply
post #3 of 3
Thread Starter 
thanks for the reply but i solved it already biggrin.gif thought i changed title to solved!
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › working heapsort [solved]