Max heap implementation in Kotlin
This looks nice, though I don't actually know kotlin.

One suggestion I'd make is that when you have multiple relational conditions in a statement like this:


assert(i &gt;= 0 &amp;&amp; i &lt; size)



It's slightly more readable if you arrange the terms in increasing order of their values, like this:

assert(0 &lt;= i &amp;&amp; i &lt; size)