Nagarro interview question

Scenario based question like if this solution is possible or not