Write a program that takes a string as input and modifies it by reversing the string in its place by mirroring the position. The first position goes to last, second to second last and so it goes on. In simple words, the string would be mirrored.
"In Place" means the program should use \$O(1)\$ additional memory regardless of the length of the string
Test Cases
Input: "Hello, World!"
Output: "!dlroW ,olleH"
Input: "Hello"
Output: "olleH"
Input: "A man a plan a canal Panama"
Output: "amanaP lanac a nalp a nam A"
Input: "123456789"
Output: "987654321"
Input: ""
Output: ""