EasyArray· 76% acceptance
#136

Reverse Array 31

Easy

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

Example 1

Input: nums = [31,32,33,34]

Output: [34,33,32,31]

Constraints

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

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

reverseArray

← All practice problems