I'm quite confused about coding a method to find the height of a heap because I was researching on it for quite a bit and found that the height of a complete tree (which would be the height of a heap) is log(base 2) of n, which I have no idea how to code. I then looked up logarithm methods but it got way more confusing from there.
I also really like HeapSort, it's extremely logical. You traverse your list, or array, or whatever, and add all those values into a heap. Then you just start removing values from the heap and adding them to the end of the array, this is sorting it because whenever you remove a value from a heap it's the max value. Boom, sorted array. But it's really inefficient, you traverse it twice meaning it takes O(2n) time.