a problem given to me at the google onsite interview