EasyArray· 63% acceptance
#106

Reverse Array 1

Easy

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

Example 1

Input: nums = [1,2,3,4]

Output: [4,3,2,1]

Constraints

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

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

reverseArray

← All practice problems