EasyArray· 66% acceptance
#126

Reverse Array 21

Easy

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

Example 1

Input: nums = [21,22,23,24,25,26,27,28,29]

Output: [29,28,27,26,25,24,23,22,21]

Constraints

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

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

reverseArray

← All practice problems