0

Input X=[3,4,2,1] and output =. [4,2,1,3] using for loop

Anyone solve this question using for loop in java. Output should be [4,2,1,3]

12th Mar 2022, 9:34 AM
Kedar Selmokar
Kedar Selmokar - avatar
2 Answers
0
Kedar Selmokar, So even numbers placed on the left, and odd numbers placed on the right. Even numbers are sorted in descending order, odd numbers are sorted in ascending order. Is that the requirement?
12th Mar 2022, 11:32 AM
Ipang