Let's write an inplace Heapsort in Swift

Using only extensions, learn how to implement a inplace heapsort, and order your lists in O(n log n).

Alcivanio (Swift)

--

Photo by chuttersnap on Unsplash

I was really interested on this problem of sorting elements. Sorting with heapsort is fast! But it has a big problem: conventionally you have to build a heap to use a heap sort. In a real world usually you don't have a heap…

--

--

Alcivanio (Swift)

Computer Engineer + iOS Engineer. I am interested in Swift, Kotlin, Firebase, Data Structures, ASO & On Solving Real World Problems.