Pocket Gems interview question

dynamic programming question, System Design, OOD