Statusneo interview question

There was a technical question regarding the coding part