EasyArray· 63% acceptance
#123

Reverse Array 18

Easy

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

Example 1

Input: nums = [18,19,20,21,22,23]

Output: [23,22,21,20,19,18]

Constraints

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

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

reverseArray

← All practice problems