
Main & Syllabi 
Schedule 
Slides 
Daily 
Homework 
Quizzes 
Code 
Office hours for instructor and TAs 
CSE 3318  Resources: slides, code, references
Slides
 Useful materials:

Highlevel course overview and goals
 Time Complexity
 Prerequisites (to review): code (executions of for loops, behavior of function calls), math (log, exponent, summations)
 Informal time complexity and motivation, insertion sort code
 Time complexity notes (from OneNote)
 Time complexity of loops
 It includes time complexity of insertion sort, and some new examples.
 PRACTICE time complexity of loops, Solution to problems A6A16 except A15 (pdf, docx)
 Discussion of add operation for ArrayList in Java
(Here is some optional material, not required for class: slides on detailed instruction count: pptx, pdf ; and slides on exact calculation of the number of loop repetitions: pdf, pptx)

Examples of Algorithms (pdf
, pptx)  CLRS Chapters 1 and 2,  Sorting (properties, abstraction, selection sort, insertion sort, indirect sorting), searching.
Fall 2020 skipped interpolated search and proof of correctness of insertion sort.
 Growth of functions  CLRS chapter 3 (all).

Count sort, Bucket sort, Radix sort (the LSD method) ( pptx)  CLRS chapter 8. s
(more on radix sort not required)
 Linked lists intro(pdf, pptx)
Before this lecture, students are expected to have seen and implemented some functions for linked lists and have a strong understanding of pointers in C.
Linked Lists in C REVIEW  review of code relevant to Linked lists, steps for solving problems with loops (for linked lists), representation of memory (static and dynamic) for linked lists (pptx)
Here is a video (with subtitles) explaining pointers. link
I like the Stanford CS Education Library:
 Stacks (pdf, pptx )
 FIFO Queues (pdf,pptx)
FIFO Queues (with class notes on last 2 slides)
 Heaps (pdf , pptx) CLRS Chapter 6.
 Java: PriorityQueue.
 lambda expression for greater than Comparator for Integer (best, flexible): Comparator<Integer> greater = (a, b) > ba;
 use the Collections class to get a comparator that reverses the order: Collections.reverseOrder()
 Binary Trees and Search Trees

Hashing ( pptx) CLRS Chapter 11 (CLRS)
Good video Hash Tables and Hash Functions.
Worked out example of double hashing and quadratic hashing
Good read: https://rcoh.me/posts/hashmapanalysis/
ASCII table

Greedy Algorithms (pdf, pptx)  CLRS Chapter 16
 Huffman Code Tree  slides used during lecture.
Greedy Algorithms (pdf, pptx)  CLRS Chapter 16
Good read (class notes based on it): https://www2.cs.duke.edu/csed/poop/huff/info/
 Dynamic Programming  CLRS Chapter 15 (15.1, 15.3, ?? 15.4, ??15.2) (Sedgewick  Sections 5.1, 5.3).

Graphs (pdf , pptx )  CLRS Chapter 22.
Links to resources on DepthFirst Search (DFS), BreadthFirst Search (BFS) and other topics:
 CLRS
 BFS and DFS,( with subtitles)
 VisualAlgo Legend of node coloring: full orange node  currently working on, empty orange node: finished (black in the whitegrayblack color scheme), empty blue nodes: discovered nodes (gray in whitegrayblack). Check the explanations in the pink bar.
 MIT OpenCourseWare: BFS, DFS
 Tricolor graph algorithm (whitegrayblack) by Andrew Myers. Good brief notes. Note that on this page, in the Edge Classification section, the example of a forward edge from D to C is wrong. That is a cross edge.

Minimumcost Spanning Trees  Prim's algorithm (pdf , pptx)  CLRS Chapter 23
If time permits: Kruskal's algorithm for MST (pptx)
(
Union_Find (CLSR: Chapter 21: Data Structures for Disjoint Sets) (Sedgewick: Chapter 1))

Shortest Paths (pdf , pptx)  CLRS Section 24.3 (Dijkstra's algorithm)

Graph Summary (pdf , pptx)

Mergesort  CLRS  Section 2.3 (Designing Algorithms).
 Master Theorem
(Recurrences  Solving recurrence formulas (pptx)  These slides have BOTH the Tree Method and the Master Theorem method. They were NOT used in Spring 2021)
Master Theorem on Wikipedia: https://en.wikipedia.org/wiki/Master_theorem_(analysis_of_algorithms)
( The substitution method for recurrences is posted here . )
Recursion (pdf, pptx)  EXTRA topic (if time permits)
Students are expected to be able to write a recursive definition for a simple function like the factorial (N!).
 Quicksort (it includes the medianofthree example)
Useful Links