EasyArray· 65% acceptance
#108

Reverse Array 3

Easy

Reverse `nums` **in-place** and return the mutated array. Variant **#3**.

Example 1

Input: nums = [3,4,5,6,7,8]

Output: [8,7,6,5,4,3]

Constraints

  • 1 <= nums.length <= 10^4

Acceptance: 65% · Topics: array, two-pointers

reverseArray

← All practice problems