M Minh Tung New member Sep 21, 2021 #1 How many odd and even phases are required respectively to sort the given array using odd-even sort.arr={3,2,3,8,5,6,2,1}. A. 3,3 B. 4,4 C. 3,4 D. 4,3
How many odd and even phases are required respectively to sort the given array using odd-even sort.arr={3,2,3,8,5,6,2,1}. A. 3,3 B. 4,4 C. 3,4 D. 4,3
G Giao Linh New member Sep 21, 2021 #2 Answer: b Explanation: Odd-even sort applies bubble sort in two phases until the array gets sorted. So here 8 phases will be required in totality to sort the array. Out of these 4 phases will be odd phase and the other 4 will be even phase. Upvote 0 Downvote
Answer: b Explanation: Odd-even sort applies bubble sort in two phases until the array gets sorted. So here 8 phases will be required in totality to sort the array. Out of these 4 phases will be odd phase and the other 4 will be even phase.