Selection Sort
Sort the array in ascending or descending order.
TC – O(N2)
SC – O(N)
Pseudo code:
Bubble Sort
Sort the array in ascending or descending order.
TC – O(N2)
SC – O(N)
Pseudo code:
Takeaway: Point 7 is making bubble sort better than selection sort.