Reverse an Array
This snippet demonstrates how to reverse an array efficiently using the two-pointer technique. It swaps elements from both ends of the array until the pointers meet in the middle. This approach is memory-efficient because it performs the reversal in place without requiring an additional array.