Sort array from 0 to K-1 ascending and rest descending
Filed under Persistent
The question
Given an array and a value K, sort the array in increasing order from index 0 to K-1 and sort the remaining elements in decreasing order.
No write-up yet. Related questions below have one.
Related Persistent questions
Collected from public candidate posts and coding forums. Updated Nov 2026.