RoosterMoney interview question

Implement-based