mediumArrayDivide And ConquerMath 0 views
Beautiful Array
An array nums of length n is beautiful if: Given the integer n, return any beautiful array nums of length n.
An array nums of length n is beautiful if:
Given the integer n, return any beautiful array nums of length n. There will be at least one valid answer for the given n.
Example 1
Input: n = 4
Output: [2,1,4,3]
Example 2
Input: n = 5
Output: [3,1,2,5,4]
Constraints
- 1 <= n <= 1000
Hints
No hints yet.
Companies
No companies reported yet.
Discussion
Sign in to join the discussion.
Loading discussion...
Test results
No test cases yet.