Meta Interview Question

1 hard and 1 medium leetcode