EasyArray· 68% acceptance
#111

Reverse Array 6

Easy

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

Example 1

Input: nums = [6,7,8,9,10,11,12,13,14]

Output: [14,13,12,11,10,9,8,7,6]

Constraints

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

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

reverseArray

← All practice problems