Click here to Skip to main content
15,895,746 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Intel Integrated Native Developer Experience - INDE - it's an experience all right... Pin
charlieg20-Aug-15 0:39
charlieg20-Aug-15 0:39 
GeneralRe: Intel Integrated Native Developer Experience - INDE - it's an experience all right... PinPopular
Marc Clifton19-Aug-15 9:50
mvaMarc Clifton19-Aug-15 9:50 
GeneralRe: Intel Integrated Native Developer Experience - INDE - it's an experience all right... Pin
PIEBALDconsult19-Aug-15 9:59
mvePIEBALDconsult19-Aug-15 9:59 
GeneralRe: Intel Integrated Native Developer Experience - INDE - it's an experience all right... Pin
Kevin Marois19-Aug-15 10:15
professionalKevin Marois19-Aug-15 10:15 
GeneralRe: Intel Integrated Native Developer Experience - INDE - it's an experience all right... Pin
CPallini19-Aug-15 10:48
mveCPallini19-Aug-15 10:48 
GeneralDoes the typical regular programmer understand HeapSort? Pin
swampwiz19-Aug-15 7:53
swampwiz19-Aug-15 7:53 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
PIEBALDconsult19-Aug-15 7:58
mvePIEBALDconsult19-Aug-15 7:58 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
harold aptroot19-Aug-15 8:00
harold aptroot19-Aug-15 8:00 
Well they're probably not born with understanding of how heapsort works, but it's not so bad when you look it up is it?

edit: quick explanation, you have a binary heap there, of the max kind. The array is divided into the heap area and the "tail". RemoveMin gives the current highest number from the heap, removing it makes space in the tail, prepend it to the tail. The heap itself is at a high level a recursive structure with a node that has a value not lower than its children, which automatically means that the only legal place for the highest value overall is in the root. Adding the structural properties (fill level by level, right child can only exist if the left child exists) makes it map simply to a dense array because the size of every level (except the last one) is a known power of two. The structural properties are then essentially true automatically, only the ordering has to be taken care of, and it can be fixed recursively (in practice iteratively) by swapping a "too small parent" with the largest child.


modified 19-Aug-15 14:13pm.

GeneralRe: Does the typical regular programmer understand HeapSort? Pin
OriginalGriff19-Aug-15 8:01
mveOriginalGriff19-Aug-15 8:01 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
CDP180219-Aug-15 9:08
CDP180219-Aug-15 9:08 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
David Days20-Aug-15 3:13
professionalDavid Days20-Aug-15 3:13 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
OriginalGriff20-Aug-15 4:03
mveOriginalGriff20-Aug-15 4:03 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
David Days20-Aug-15 4:11
professionalDavid Days20-Aug-15 4:11 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
CPallini19-Aug-15 9:22
mveCPallini19-Aug-15 9:22 
GeneralRe: Does the typical regular programmer understand HeapSort? PinPopular
R. Giskard Reventlov19-Aug-15 9:56
R. Giskard Reventlov19-Aug-15 9:56 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
Yuriy Loginov19-Aug-15 10:49
professionalYuriy Loginov19-Aug-15 10:49 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
Amarnath S19-Aug-15 16:51
professionalAmarnath S19-Aug-15 16:51 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
Dan Neely20-Aug-15 3:42
Dan Neely20-Aug-15 3:42 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
Super Lloyd19-Aug-15 19:42
Super Lloyd19-Aug-15 19:42 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
grgran20-Aug-15 5:19
grgran20-Aug-15 5:19 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
Walt Karas20-Aug-15 5:37
Walt Karas20-Aug-15 5:37 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
SeattleC++20-Aug-15 6:55
SeattleC++20-Aug-15 6:55 
GeneralRe: Does the typical regular programmer understand HeapSort? Pin
rcampbell1220-Aug-15 8:17
rcampbell1220-Aug-15 8:17 
GeneralStupid Recruiters - Part Whatever Pin
Kevin Marois19-Aug-15 6:18
professionalKevin Marois19-Aug-15 6:18 
GeneralRe: Stupid Recruiters - Part Whatever Pin
MacSpudster19-Aug-15 6:23
professionalMacSpudster19-Aug-15 6:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.