Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
13.7.1. Initial Sorting Phase
This section
Practice test
12 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
3 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is the time complexity of a brute-force closest pair algorithm?
Hint
Think about how many pairs need to be checked.
- 2.
Why do we sort the points before finding the closest pair?
Hint
Consider the steps of the divide and conquer method.
- 3.
What is the efficiency of the closest pair algorithm using divide and conquer?
- O(n²)
- O(n log n)
- O(log n)
Hint
Think about how the algorithm is structured.
- 4.
Is it true that the closest pair might not be within the same half when using divide and conquer?
- True
- False
Hint
Consider the way boundary pairs are checked.
- 5.
Given the points (3, 4), (2, 3), (5, 1), (1, 5), and (6, 8), find the closest pair.
Hint
Use the distance formula and consider sorting to help with comparisons.
- 6.
Why does the distance branching reduce the number of comparisons for points in the boundary? Provide a mathematical explanation.
Hint
Think about the geometric arrangement of points and their distances.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
2 more questions available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting