Sorting Algorithms in Python — Heapsort

Heap data structure

  • max-heap: every element is ≤ than its parent (we find the biggest value at the root);
  • min-heap: every element is ≥ than its parent (we find the lowest value at the root).

How to turn an array into a max-heap

Finally Heapsort!

Algorithm Overview

Conclusions

F R A G I L E — Handle with care 👨‍💻 Security Researcher 🖖 Incurable nerd 🎞️ Movie/TV Show addicted

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Health monitoring with Azure : A brief guide to Azure Functions

Accounts Library in Corda: Part 2

How to participate in Authtrail’s launch on Beamswap Docks

BisaGo: The Architecture

Free will, Software programs and humans

95% off #Interactive Beginners Guide to MATLAB $10

NumPy — Required functions used while programming — Sagar Jaybhay

Analyze your web server access log as a pro

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
thelicato

thelicato

F R A G I L E — Handle with care 👨‍💻 Security Researcher 🖖 Incurable nerd 🎞️ Movie/TV Show addicted

More from Medium

Sorting Algorithms in Python — Bucket Sort

Walrus Operator Explained [Python]

A Look at Instance, Static, Class and Abstract Methods in Python

How to Reverse a String in Python?