EasyArray· 72% acceptance
#115

Reverse Array 10

Easy

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

Example 1

Input: nums = [10,11,12,13,14,15,16,17,18,19,20,21,22]

Output: [22,21,20,19,18,17,16,15,14,13,12,11,10]

Constraints

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

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

reverseArray

← All practice problems