Competitive: final assessment

This covers the whole course. Take it after the last module.

Final quiz

1. What does Time Limit Exceeded mean?
2. Why should sums and products usually be long long?
3. What does a prefix-sum array give you?
4. What is the first step in many greedy interval problems?
5. Which tool finds the first element that is at least x in a sorted vector?
6. What does BFS on a grid give?
7. A window of size k slides along an array. How is its sum updated?
8. Which method counts the 1 bits fastest when few bits are set?
9. Why does Dijkstra skip an entry with d > dist[u]?
10. Which structure answers "are these two items in the same group?" in almost constant time?
11. To maximise the minimum distance between k cows placed in stalls, which method fits?
12. 2ⁿ subsets are enumerated by a mask. For which n is this still fast?
13. How are a prefix-sum array and a difference array related?
14. A graph has 10⁵ vertices and 2 × 10⁵ weighted edges. Which shortest-path method fits?
15. Kruskal's algorithm skips an edge when:
16. To count the subarrays whose sum is k with negative numbers allowed, you can:
17. A DFS on a path of 10⁶ vertices may fail on a judge. Why?
18. Why is power(a, p - 2) the inverse of a modulo a prime p?

Practical assessment:

Final project

A route planner: Build a program that plans routes on a map: fewest moves through a maze, cheapest travel cost on a weighted road network, and the cheapest cabling that connects every town.

How it is evaluated

To complete this course