April 2018
Beginner to intermediate
426 pages
10h 19m
English
We can use the binary heap data structure to help us create a very famous sorting algorithm: the heap sort. The heap sort algorithm consists of three steps:
We use the max heap results in an array sorted in ascending order (from smallest to biggest). If we want the array to be sorted in descending order, we can use the min heap instead.
The following ...