Musafir.com interview question

second codding round