EY interview question

Hackerrank based 3-4 Coding questions