Capital One Interview Question

implement an algorithm to sort coins