EasyArray· 62% acceptance
#122

Reverse Array 17

Easy

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

Example 1

Input: nums = [17,18,19,20,21]

Output: [21,20,19,18,17]

Constraints

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

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

reverseArray

← All practice problems