About this document
Bubble Sort vs Selection Sort Analysis by l l is a document available to read on EtoBox.
The document discusses two sorting algorithms: bubble sort and selection sort. Bubble sort works by comparing adjacent pairs of elements and swapping them if they are out of order, while selection sort finds the smallest element and swaps it into the correct position each iteration. Both algorithms have a time complexity of O(n^2) and space complexity of O(1). However, selection sort is more efficient because it does fewer swaps by only swapping in the outer loop, rather than the inner loop used in bubble s
- Author
- l l
- Language
- EN