Pregunta de entrevista de Bank Neo Commerce

I was asked to reverse an integer