Pocket Gems Interview Question

1 Greedy, 1 Tree question