Implement reverse to reverse the array in place – modify arr through its pointer directly, without
allocating a second array to copy into.
The standard technique is two indices (or, equivalently, two pointers) starting at opposite ends and walking
toward each other, swapping as they go, stopping once they meet or cross. This “converge from both ends” pattern
shows up again for palindrome checks, partitioning, and quicksort – worth having solid here. Trace it by hand on a
4-element and a 5-element array before coding: does your stopping condition (left < right) correctly leave a
lone middle element alone in the odd case?