Odessa interview question

Leetcode easy problem which can be solved in 2 mins.