Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2164. Sort Even and Odd Indices Independently
Rearrange the array by sorting elements at even indices in non-decreasing order and elements at odd indices in non-increasing order, then placing the sorted values back into their original parity positions. Return the resulting array.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late November, 2024
Meta
Junior
Sort numbers based on whether they are odd or even
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.