Meta Interview Question

Leetcode hard and some variants on the same