Tap here to switch tabs
Problem
Submissions

Problem: Concatenate Array With Reverse

med
30 min
Try to solve the Concatenate Array With Reverse problem.

Statement

Given an integer array nums of length n, return an array ans of length 2n2n formed by appending the elements of nums in reverse order to the end of nums.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Concatenate Array With Reverse

med
30 min
Try to solve the Concatenate Array With Reverse problem.

Statement

Given an integer array nums of length n, return an array ans of length 2n2n formed by appending the elements of nums in reverse order to the end of nums.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤100\leq 100