EasyArray· 67% acceptance
#144

Reverse Array 39

Easy

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

Example 1

Input: nums = [39,40,41,42,43,44,45,46,47,48,49,50]

Output: [50,49,48,47,46,45,44,43,42,41,40,39]

Constraints

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

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

reverseArray

← All practice problems