Frage im Vorstellungsgespräch bei MDP Infra (India)

One logic based coding question. sorry but i forgot