Microsoft interview question

Leetcode easy, one about sorting and one used a heap