Kotlin: Implementing a Heap

Yup, this post will discuss implementing a traditional Heap in Kotlin. Why bother? You won’t find a justification based on some driving need, it was an exercise in curiosity. I was being asked some interview questions around data structures, and hadn’t hand rolled one in, well, forever, and wanted to dust off that part of my brain and do it in Kotlin. So, unless you’re just curious, you’ll probably want to give this a pass.

--

--

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