WNS-Vuram interview question

Logical question and Some basic coding questions