Adikteev interview question

questions were with middle difficulty