Zensar Technologies Interview Question

During a technical interview, I was asked to create a function that performs a certain task using any programming language I am comfortable with.