EasyArray· 63% acceptance
#140

Reverse Array 35

Easy

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

Example 1

Input: nums = [35,36,37,38,39,40,41,42]

Output: [42,41,40,39,38,37,36,35]

Constraints

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

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

reverseArray

← All practice problems