Pregunta de entrevista de Hexaware Technologies

Similar to the Leetcode problem.