Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Bubble sort

7,600 views

Published on

Bubble sort

  • Login to see the comments

  • Be the first to like this

Bubble sort

  1. 1. Bubble Sort Part 1 of 2 - Series
  2. 2. Overview • Simplest of all sorts • Compare first 2 elements and swap if out of order, keep doing for each adjacent pair of elements until end of array – last element is largest element in array • Do procedure for each next largest element until array is sorted.
  3. 3. Pseudocode
  4. 4. Video Demonstration • Link
  5. 5. Performance Worst case performance: O(n^2) Best case performance O(n)
  6. 6. Improvements • Optimized Bubble Sort • Comb Sort…

×