Microsoft Interview Question

Leetcode easy, one about sorting and one used a heap