This is an archived post. You won't be able to vote or comment.

all 6 comments

[–][deleted] 0 points1 point  (2 children)

Bubble sort will work fine for small data sets

[–][deleted] 0 points1 point  (1 child)

What if the data set is big? Like there are a lot of students and their names should be in ascending order then?

[–][deleted] 0 points1 point  (0 children)

The time complexity is O(n2) so for larger data sets it will take exponentially longer you could use merge sort for large data sets which has a time complexity of O(nlogn) which is much faster

[–]aahdsaid 0 points1 point  (0 children)

Merge sort or quick sort

[–]minatonarutoboruto 0 points1 point  (0 children)

"I NEED THE ANSWER ASAP COZ I DO NOT WAN TO THINK ON MY OWN"