Oracle Interview Question

Traversal code, Min Coins problem