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.

Sorting Algorithms


Published on

Published in: Education
  • Be the first to comment

Sorting Algorithms

  1. 1. Sorting AlgorithmsBy Bianca Lopez, Meg Schreck, ShantiMechery<br />
  2. 2. What is A Sorting Algorithm<br />Algorithm<br />a precise rule (or set of rules) specifying how to solve some problem.<br />Sorting Algorithm<br />In computer science and mathematics, a sorting algorithm is an algorithm that puts elements of a list in a certain order.<br />
  3. 3. Bubble Sort<br />One of the earliest sorting algorithms (Was analyzed as early as 1950)<br />Widely used as the first example of a sorting algorithm<br />Is one of the simplest sorting algorithm<br />One of the algorithms that takeslongest amount of time to sort<br />Gets it name from the way smaller elements “bubble” to the top of the list.<br />It is a comparison sort. (It compares each card individually with the card next to it)<br />
  4. 4. Quicksort<br />Quicksort is a widely used sorting algorithm invented by C. A. R. Hoare in 1960.<br />It was invented for looking up words in the dictionary more efficient<br />Its popularity has lasted since its invention because it’s easy to perform, is a “general purpose” sort, and has an efficient running time. <br />One of the algorithms that takes the shortest amount of time to sort things with.<br />
  5. 5. Examples<br />Bubble Sort Explained With Height!<br />Choose the first and second person to focus on. Switch them so the shorter person is on the left.<br />Repeat for the second and third person.<br />Keep going through the row, comparing the people’s height next to each other and switching them if needed. Do this until all of the people are sorted from shortest to tallest<br />Quicksort Explained With Height!<br />Choose a random person<br />Choose another person. If it is taller than the original person you chose, he/she should be on the right of the original person. If the person is smaller compared to the person you chose, put it to the left. Do this until each person is on one side of the original person.<br />Repeat the first 2 steps until all the people are in order from shortest to tallest.<br />
  6. 6. Examples<br />Selection Sort Explained Though Height!<br />Put 5 people in a random line<br />Look at two people at a time until you find the one with the shortest height<br />Rearrange remaining people<br />Repeat steps 2-3 until you have all of the people in order according to height<br />Insertion Sort Explained Through Height!<br />Put 5 people in a random line<br />Choose one person in line to focus on<br />Choose a new person and place it the right of the first person if it is shorter and left of the first if it is taller<br />Repeat until everyone is in order according to height<br />
  7. 7. Is it Efficient<br />The efficiency of a sorting algorithm depends on the number of moves and comparisons.<br />One of the most efficient sorting algorithms is Quicksort. <br />One of the least efficient sorting algorithms is Bubble Sort. <br />
  8. 8. The Importance and Uses of Sorting Algorithms<br />
  9. 9. Uses of Sorting Algorithms<br />Used for converting data and for producing human-readable output<br />Used for search algorithms when picking relevant results<br />Sorting amounts of data in java and excel<br />Companies and hospitals use Sorting Algorithms to sort records<br />
  10. 10. Importance of Sorting Algorithms<br />help you order elements that are in a list.<br />order any list that could be used and they compare data that is sorted<br />It is used to sort any data that is unordered or partially ordered<br />Save time!<br />
  11. 11. Thoughts on Sorting Algorithms<br />It was worth learning<br />Made order/sorting easier <br />We now know how computers sort!<br />We now know how to use computers to sort<br /> - good skill to know!<br />
  12. 12. Thank You for watching our presentation!<br />