Cognizant interview question

One thing they asked me was to write a basic coding problem on arrays or strings, such as reversing a string or checking if it is a palindrome.