Rowan University Interview Question

A coding question to solve