BigFix interview question

Leetcode technical question that was pretty standard.