Week 7

Be sure to take the quiz while it is open!

Upon finishing this learning module, you should be able to:

  • Describe the requirements of an algorithm
  • Execute basic searching and sorting algorithms by hand
  • Conduct a “best first” heuristic search of a graph
  • Use logical operators to express complex conditions

Searching And Sorting

Searching and sorting are two fundamental tasks that any program dealing with lists of data generally needs to do. We will be studying some algorithms for accomplishing these tasks in this unit. Next unit, we will use these algorithms as the basis to learn about how we compare the efficiencies of algorithms.

Start by reading sections 8.1–8.8, on Algorithms, in Welcome to CS. (Stop when you get to Efficiency in section 8.9.)

Explore the Search and Sort Practice worksheet, and check your work with the key.

Optionally, watch these videos on how Selection and Insertion sort work.

Read the AI Search supplement. There is no corresponding material in Nine Algorithms; we will resume working out of it next unit.

Explore the AI Search Practice worksheet, and check your work with the key.

Optional Extras: Insertion Sort, the Dance

Insertion Sort, the new dance craze!