Meta Interview Question

some questions regarding heap, time complexity, space complexity