Meta Interview Question

Two algo questions, one using min heap and the other about string manipulation.