# Reverse String (LeetCode 344): Interview Notes

## Problem
Write a function that reverses a string. The input is given as an array of characters `s`. You must do this in-place with O(1) extra memory.

## Approach
Two pointers from both ends. Swap `s[lo]` and `s[hi]`, then `lo += 1`, `hi -= 1`, until they meet. Narrate a dry run on `['h','e','l','l','o']` and call out the loop condition `lo < hi`.

## Complexity
Time O(n), space O(1).

## Practice tip
Rehearse the in-place story with [real-time AI interview assistant for live interviews](https://www.linkjob.ai/interview-copilot/).

*Disclosure: I work on Linkjob AI.*