Which optimized sorting/searching pattern solves this lesson cleanly?
Practice this question from Find First and Last Position - Boundary Binary Search Pattern Practice Quiz, with options and an explanation.
Question
Which optimized sorting/searching pattern solves this lesson cleanly?
Option A — Correct answer
Boundary binary search with lower and upper bounds.
Option B
Plain nested loops without using order
Option C
Recursive DFS on tree nodes
Option D
Character frequency counting only
Explanation
Boundary binary search with lower and upper bounds.