How to reverse String in swift?

[Question]: Reverse a string with O(1) extra memory. The input string is given as an array of characters like [“C”, “A”, “R”] So here we have used one for loop which iterates half of array & swapping last with first