Time complexity: O(n*log(k))
Space complexity: O(k)
Runtime 4 ms Beats 74.44% Memory 44.46 MB Beats 33.58%