use algorithmatic.com's in-browser integrated-development-environment here. The IDE offers syntax-highlighting, realtime validation, syntax-autocompletion, autocompletion for external-calls, interpreter and basic debugging.
Account
signin
algorithmatic.com uses OpenID - that means you don't need to register, probably you already have an OpenID, you just need to enable it. Click here to sign in
Heap Sort is a comparison-based sorting algorithm, and is part of the selection sort family. Although somewhat slower in practice on most machines than a good implementation of quicksort, it has the advantage of a worst-case O(n log n) runtime. Heap Sort is an in-place algorithm, but is not a stable sort. This algorithm should be used when there are concerns about the worst-case performance when sorting. It should not be used on value-based data because it moves elements around frequently.
More information: http://en.wikipedia.org/wiki/Heapsort