EasyArray· 65% acceptance
#125

Reverse Array 20

Easy

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

Example 1

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

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

Constraints

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

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

reverseArray

← All practice problems