Hexaware Technologies Interview Question

It was a coding question to solve and pass all test case environments