IBM Interview Question

I had to write code for a specific problem. I could chose the language