6. consider the problem of sorting n input numbers. bubble sort runs in approximately n2 steps and heap sort(which is one of the best sorting algorithm) runs in approximately nlog n steps. with n processing nodes, odd-even transposition sort algorithm runs in approximately n steps. what is the speedup of odd-even transposition sort algorithm?

See Answers (1)

Accepted Answer

All PRAM processors have access to the globally shared memory (GBM). The outer loop runs for O(n) iterations while the inner loop performs O(n) work every iteration, making the overall workload O. (n2).What does bubble sort O n2 mean?The bubble sort algorithm is a trustworthy sorting method. In the worst scenario, this algorithm's time complexity is O. (n2). A space complexity of O applies to the bubble sort (1). In bubble sort, there are exactly as many inversion pairings as there are swaps.The best-case bubble sort running time is O(n) O(n) O(n). To keep track of how many swaps it completes, bubble sort can be modified. Using bubble sort when an array is already sorted no swaps, the algorithm can terminate after one pass.To learn more about bubble sort refer to:https://brainly.com/question/14944048#SPJ4

Related Question in Computers and Technology