Relative Sort Array
Sort arr1 so that elements appear in the order of arr2 (all arr2 elements are in arr1); elements not in arr2 are placed at the end in ascending order.
Constraints
1 <= m <= n <= 1000
Discussion
No discussions yet.
Join Shalyam Newsletter
Get exclusive insights with every issue: education, research and innovation news.
Shalyam Support
Hi! Ask us anything โ we'll reply on WhatsApp or Telegram within 24 hours.