Solved using heap_sort as well