CS 3.5. (ALEVEL) - Sorting Algorithms Flashcards
(2 cards)
1
Q
Bubble sort
A
- Time complexity is O(n²)
- make passes through data and swaps adjacent items to order them , stops passing through data when no swaps performed
2
Q
Merge sort
A
-Time complexity is O(nlogn).
- Divide and Conquer method, split array into individual lists then merge them together sorted