Hive (CA) interview question

Not interested in leaking problems. Classical coding questions, with elements of dynamic programming, but could be solved properly with greedy techniques as well. Might be harder to solve on time if you don't use Python.