StayGlad interview question

They asked me puzzle.