Made Tech interview question

Solving an unseen coding problem.