Approach Explanation (o゜▽゜)o☆
- I used two pointers one at the start (i=0) and one at the end of the array (j = len(arr) - 1).
- I swapped the elements at those positions.
- I moved the pointers inward (start forward, end backward).
- I repeated the swaps until the pointers met in the middle.
- I ended up with the reversed array in place
Methods Used: ヽ( ̄▽ ̄)ノミ
- Two pointer
- Python built-in
- Recursive

Top comments (0)