EasyArray· 71% acceptance
#148

Reverse Array 43

Easy

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

Example 1

Input: nums = [43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58]

Output: [58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43]

Constraints

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

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

reverseArray

← All practice problems