Which of the following explains the complexity of Bubble Sort? (a) It requires O(log N) operations to reduce to a set of
Posted: Fri May 20, 2022 12:57 pm
Which of the following explains the complexity of Bubble
Sort?
(a) It requires O(log N) operations to reduce to a set of
ordered lists and then O(N) to
combine all lists.
(b) Each scan requires O(log N) comparisons. There needs to be
O(N) scans.
(c) It requires O(N) operations to reduce to a set of ordered
lists and then O(N log N) to
combine all lists.
(d) Each scan requires O(N) comparisons and places 1 element
correctly. There needs to
be O(N) scans.
(e) It requires O(N) operations to reduce to a set of ordered
lists and then O(N2) to combine
all lists.
Sort?
(a) It requires O(log N) operations to reduce to a set of
ordered lists and then O(N) to
combine all lists.
(b) Each scan requires O(log N) comparisons. There needs to be
O(N) scans.
(c) It requires O(N) operations to reduce to a set of ordered
lists and then O(N log N) to
combine all lists.
(d) Each scan requires O(N) comparisons and places 1 element
correctly. There needs to
be O(N) scans.
(e) It requires O(N) operations to reduce to a set of ordered
lists and then O(N2) to combine
all lists.