Learning Objectives:
Software Tools Needed: Web browser to access textbook and an IDE (on-line or on computer) with core Python 3.6+ loaded.
The textbook covers several canonical sorts. We will focus on three of them:
Bubble Sort: A straightforward sort that's easy to implement:
Insertion Sort: A slightly more complicated sort with the nice property that elements that if some elements are already in order, they stay in order (the sort is "stable"):
Merge Sort: A recursive sort with better running time (worst case complexity of O(n lg n) versus O(n^2)):
Python has some sorting functions built-in to the core language. Read through the Python How-To page on the basic sorting functions:
There are weekly written quizzes and code reviews in 1001G, 11:30-5:30, Mondays-Fridays when classes are in session. No appointments are needed for CSCI 227 students.
For additional practice on core Python, see the HackerRank prepare series:
HackerRank: Prepare Python
Click the Easy/Medium
option on the right hand menu, and work through their Python challenges.
For more practice on using sorting to solve problems, here are some popular ones from LeetCode: