Reverse String
easyReverse array of characters in-place using two pointers
Reverse String
Key Insight
Swap left and right elements, move both pointers inward until they meet
Step 1Initial Array
left
h
0e
1l
2l
3right
o
4→converge←
Place pointers at both ends of the character array.
1 / 5