Data Structures & AlgorithmsModerateICPC regional · graph colouring
Problem: What is the minimum number of colours that suffices for any planar graph?
- A. 3
- B. 4
- C. 5
- D. 6
Correct answer: B. 4
The four colour theorem says four colours always suffice, and three can fail for some planar graphs.
More Coding Interview Problems questions
- Problem: What is the time complexity of computing the KMP prefix function of a pattern of length m?
- Problem: Which structure supports push, pop and getting the minimum, all in O(1) amortised time?
- Problem: Which property makes counting sort stable and therefore usable inside radix sort?
- Problem: Which structure gives a queue with O(1) amortised enqueue, dequeue and minimum queries?
- Problem: The Chinese remainder theorem gives a unique solution modulo M for a system of congruences under which condition?
- Problem: What guarantee does the maximal-matching heuristic give for vertex cover?