What is the brute-force baseline for rotated search?

Practice this question from Search in Rotated Sorted Array - Rotated search Pattern Practice Quiz, with options and an explanation.

Question

What is the brute-force baseline for rotated search?

Option A — Correct answer

Scan every index

Option B

Use prefix sums

Option C

Use a queue

Option D

Reverse the target

Explanation

Scan every index and compare with target.

Search in Rotated Sorted Array - Rotated search Pattern Practice Quiz

All questions · Previous question · Next question

Open on QuizMaker