Meta Interview Question

It is simple leetcode question