Algorithms

  1. Would my algorithm for sorting numbers work if the person executing it did not know how to tell which of two numbers was the largest?
  2. What happens with my algorithm for sorting numbers if two cards have the same number on them?
  3. How would my algorithm for sorting numbers change if instead of numbers, the cards had people's names printed on them, and I wanted to sort them into alphabetical order?
  4. How would my algorithm for sorting numbers change if instead of sorting them into ascending order, I wished to sort them into descending order?
  5. How would my algorithm for sorting numbers change if instead of five cards, I had an unknown number of cards?
  6. Imagine that instead of five cards, you had 50 cards to sort. Would you use the same algorithm? Would you do it by hand or write a computer program to input the numbers and sort them?
  7. Imagine that instead of five cards, you had a million cards to sort. Would you use the same algorithm? Would you do it by hand or write a computer program to input the numbers and sort them?
  8. Write a better algorithm than mine for sorting numbers into ascending order.
  9. What criteria would you use to determine whether one algorithm is better than another?
  10. Write an algorithm for driving from your home to school.

Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.