Mckinsey programming excercise