Pregunta de entrevista de i-exceed technology solutions

random coding test with some online tool which doesn't give proper guidance.