Cognizant interview question

Reverse String, OOPs, Array, HashMap