String Basics

Two-pointer techniques for manipulation and checking.

h
0
e
1
l
2
l
3
o
4
Status: Ready
Speed
1function reverse(str):
2 left = 0, right = len - 1
3 while left < right:
4 swap(str[left], str[right])
5 left++, right--