Meta Interview Question

Leetcode #123456