Cognizant interview question

Coding problem on string and array manipulation using js, python, c++