This assessment verifies the Greedy and Advanced Graphs module. Passing it contributes up to 12 points in the 74-85 score band.
Questions
8
Limit
105m
Pass
85%
Score
+12
Question 1scenarioAdvanced
13 pts
Greedy exchange argument for interval selection
A calendar service wants to accept the maximum number of non-overlapping maintenance windows. A candidate sorts by earliest start time and greedily accepts compatible windows. Review the mistake, give the correct greedy rule, and explain the proof idea.
Question 2codingAdvanced
14 pts
Greedy invariant and implementation reasoning
Design the Gas Station solution. Given `gas[i]` and `cost[i]`, return a start index that completes the circuit or `-1`. Explain why restarting after a negative tank is safe.
Question 3code-reviewAdvanced
13 pts
Interval overlap and resource-capacity reasoning
A scheduling service counts meeting rooms by merging overlapping intervals and returning the number of merged blocks. Explain why this is wrong, then design the correct room-count algorithm.
Question 4codingAdvanced
12 pts
Interval insertion and merge correctness
A product stores sorted, non-overlapping availability intervals. Insert one new availability interval and return sorted non-overlapping intervals. Describe the three phases and edge cases.
Question 5scenarioAdvanced
14 pts
Topological ordering and DAG constraints
A build system has packages and directed dependencies. A candidate uses DFS traversal order from an arbitrary package and says that is enough to build everything. Review the risk and design a topological-sort solution.
Question 6multiple-choiceAdvanced
9 pts
Cycle detection in topological sort
Which statement is the strongest reason `Course Schedule II` can return an empty order?
Question 7codingAdvanced
14 pts
Union Find cycle detection
Given edges of an undirected graph, return the first edge that creates a cycle. Design the Union Find solution and explain what `union` returning false means.
Question 8scenarioAdvanced
13 pts
Choosing Union Find for dynamic connectivity
A social product receives millions of friendship edges over the day and repeatedly asks whether two users are already in the same connected group. Compare rebuilding DFS/BFS per query with Union Find, and mention the limitation of Union Find.