Sort even numbers ascending and odd descending in array
Filed under Thoughtworks
The question
Given an array, print even numbers in ascending order and odd numbers in descending order.
No write-up yet. Related questions below have one.
Related Thoughtworks questions
Collected from public candidate posts and coding forums. Updated Nov 2026.