Advance Programming Problem Session 1 Solution