Scale Interview Question

Had to write helper code for their codebase