Nagarro interview question

Data structures Reverse string and array