Pocket Gems Interview Question

DP question, graph problem, and code evaluation.