LenDenClub interview question

Solve a simple coding question