EasyArray· 78% acceptance
#121

Reverse Array 16

Easy

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

Example 1

Input: nums = [16,17,18,19]

Output: [19,18,17,16]

Constraints

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

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

reverseArray

← All practice problems