Pergunta de entrevista da empresa Siemens

Oops concepts. Problem solving. 2 coding questions.