Pregunta de entrevista de Siemens

Leetcode based coding to solve