EasyArray· 69% acceptance
#112

Reverse Array 7

Easy

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

Example 1

Input: nums = [7,8,9,10,11,12,13,14,15,16]

Output: [16,15,14,13,12,11,10,9,8,7]

Constraints

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

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

reverseArray

← All practice problems