Sei sulla pagina 1di 1

CS 180 Midterm Topics

1. Week 1
a. Famous problem O(n) [In class]
b. Stable matching O(m^2) [Chapter 1]
c. Time analysis: Big O, Big Omega, Big Theta [Chapter 2]
d. Basic graph definitions [Chapter 3]
i. Connected vs disconnected
ii. Directed vs undirected
iii. Weighted vs unweighted
iv. Connected vs unconnected
v. Representation (adjacency list vs linked lists)
e. Graph Algorithms [Chapter 3]
i. BFS why do you want to use FIFO queue?
ii. DFS why do you want to use FILO stack?
f. Bipartite Graphs [Chapter 3]
i. Odd number of nodes in a cycle
ii. BFS algorithm
2. Week 2
a. Shortest path for unweighted graph using BFS [in class]
b. DAGs [Chapter 3]
i. Topological Sort O(n + e)
c. Strongly connected components
d. DAG k-partition problem [in class]
e. Overlapping task optimization problem (greedy) [Chapter 4]
3. Week 3
a. Shortest path in DAGs
b. Dijkstras algorithm
i. Shortest path in weighted undirected graph
c. Minimum spanning tree
i. MST theorem
d. Prims and Kruskals Algorithms (for MST)
e. Union-Find implementation
4. Week 4
a. Max-min problem (eloge complexity)
b. Huffman encoding (greedy algorithm)
c. Divide and conquer
i. Recurrence
d. Merge sort
e. Inversion count problem [chapter 5]

Potrebbero piacerti anche