Lumen interview question

Leetcode style algorithm question/coding excercise.