Why is the brute-force approach less ideal here?
Practice this question from Merge Intervals - Sort and Sweep Pattern Practice Quiz, with options and an explanation.
Question
Why is the brute-force approach less ideal here?
Option A — Correct answer
Pairwise repeated merging is slow and messy.
Option B
It is always O(1)
Option C
It avoids all comparisons
Option D
It only works for binary trees
Explanation
Pairwise repeated merging is slow and messy.