Strings easy time O(n) space O(1)
Reverse a String
Swap the first and last characters, then move both pointers inward. In-place, no second string required.
Reverse "algorithm" in place.
1 / 9
Practice
Machine twin: /dsa-viz-v2/reverse-string.json — the full deterministic run as structured data.