EMIS Group Interview Question

Coding part