What email address or phone number would you like to use to sign in to Docs.com?
If you already have an account that you use with Office or other Microsoft services, enter it here.
Or sign in with:
Signing in allows you to download and like content, and it provides the authors analytical data about your interactions with their content.
Embed code for: HEAPSORT
Select a size
Heapsort is a sorting algorithem that makes use of a binary tree.
Heapsort is always o(n log n).
Heapsort is a balanced ,left-justified binary tree in which no node has a value greater then the value in its parents.
Now insert the following values into a heap
Insert 8 into heap tree
Insert 10 as child of 8.
Then shift up.
Insert 5 as child of root.
tree fits the properties of a heap no additional steps are needs.
Insert 12 of the left most child
Shift up until heap the tree becomes a heap