String Basics
Two-pointer techniques for manipulation and checking.
h
0e
1l
2l
3o
4Status: Ready
Speed
1function reverse(str):
2 left = 0, right = len - 1
3 while left < right:
4 swap(str[left], str[right])
5 left++, right--
Two-pointer techniques for manipulation and checking.