Pregunta de entrevista de Airbus

Asked to solve balancing equations coding challenge