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.
Which of the following explains the complexity of Bubble Sort? (a) It requires O(log N) operations to reduce to a set of
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am