PointClickCare Interview Question

They asked me to solve a coding puzzle.