EasyArray· 66% acceptance
#109

Reverse Array 4

Easy

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

Example 1

Input: nums = [4,5,6,7,8,9,10]

Output: [10,9,8,7,6,5,4]

Constraints

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

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

reverseArray

← All practice problems