Pocket Gems Interview Question

They required a hackerrank test.