Zaleos interview question

Solve a leetcode problem in 45 min.