EasyArray· 73% acceptance
#133

Reverse Array 28

Easy

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

Example 1

Input: nums = [28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]

Output: [43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28]

Constraints

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

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

reverseArray

← All practice problems