CSCI 1913 Spring 2026
Documents
Part 1 – Python and the study of Algorithms
Module 00 - Course Overview
For this module we will focus first-and-foremost on getting the class started. We’ll be seeing the basic class design, learning what are the parts of the class, and how they will help us learn.
By the end of the week you should be able to:
- Decide whether CSCI1913 is a course for you (if you fit the audience)
- Prepare for what we will do to learn, and why.
Documents
Slides
Attendance
Module 01 – Intro to Python
In this module we’ll jump right into some practical python programming. By the end of this module you will be able to:
- Read basic python programs and predict their behavior
- Write basic python functions
Slides
Lecture Recording
In-class exercise
Module 02 – Python
We will continue working with Python. In this module we will finish discussing basic python features with a few final details of pyhton’s many scopes, in particular how you can import functions from other files – and some unique details about how this works in python.
Then we will begin exploring Python’s advanced data representation tools: data structures. Data structures create a flexible way to represent many common forms of data in an ad-hoc way without creating specific classes, or writing tricky data-management code.
We will be focusing on the List this week, which is python’s answer to the array. Towards the end of the week we will introduce the set and dictionary as well, with the plan to finish them next week.
By the end of this module you will be able to:
- Read, write, run, test, and debug simple python programs
- Identify a list, tuple, and dictionary as represented in python code
- Create, and loop over python lists
Slides
In-class exercises
Lecture Recordings
Computer Lab 01
Module 03 – Advanced Python
By the end of this module you will be able to:
- Explain the concept of mutability and distinguish between mutable and immutable data types in Python, providing examples of each and describing the implications for variable assignment and function parameters.
- Create and manipulate Python lists using various methods including indexing, slicing, appending, inserting, removing, and sorting elements, while understanding the performance characteristics of these operations.
- Analyze the behavior of list aliasing and copying, explaining the difference between shallow and deep copies and predicting how changes to one list reference will affect others.
- Create and manipulate dictionaries to store and retrieve key-value pairs, using appropriate methods for adding, updating, removing, and accessing elements.
- Iterate over dictionaries using various approaches (keys, values, items) and understand the implications of dictionary ordering in modern Python versions.
- Apply dictionaries to solve practical problems such as counting occurrences, grouping data, creating lookup tables, and representing structured information.
- Use sets for membership testing and duplicate elimination, understanding when sets are preferable to lists for specific operations and leveraging their O(1) average-case lookup performance.
- Perform set operations including union, intersection, difference, and symmetric difference to solve problems involving collections and relationships between groups.
- Select appropriate data structures (lists, dictionaries, or sets) based on the requirements of a given problem, justifying choices based on performance, functionality, and code clarity.
Slides
Module 04 – Big O notation, and searching
By the end of this module you will be able to:
- Analyze the time complexity of simple algorithms by identifying the relationship between input size and running time.
- Express algorithm efficiency using Big-O notation and correctly classify common complexity classes including O(1), O(log n), O(n), O(n log n), O(n²), and O(2ⁿ).
- Compare algorithms based on their asymptotic behavior and determine which algorithm is more efficient for large inputs by analyzing their Big-O classifications.
- Distinguish between best-case, average-case, and worst-case time complexity and explain when each measure is most relevant.
- Implement linear search and binary search correctly in code and trace their execution on sample datasets.
- Analyze the time complexity of linear search as O(n) and binary search as O(log n) and explain why binary search is asymptotically faster.
- Explain why binary search requires sorted data as a precondition and demonstrate how the algorithm eliminates half of the remaining search space with each comparison.
Slides
Module 05 – Sorting
By the end of this module you will be able to:
- Implement selection sort, insertion sort, and bubble sort correctly in code and trace their execution on small datasets.
- Analyze and compare the time complexity of selection sort, insertion sort, and bubble sort in their best, average, and worst cases.
- Explain the underlying mechanism of each sorting algorithm including how elements are compared, swapped, and positioned during execution.