EasyArray· 62% acceptance
#139

Reverse Array 34

Easy

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

Example 1

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

Output: [40,39,38,37,36,35,34]

Constraints

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

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

reverseArray

← All practice problems