Navdy interview question

Coding Challenge