Domeyard Interview Question

Simple algorithm questions, OO design.