Meta interview question

some questions regarding heap, time complexity, space complexity