Question DSA-SRCH-0078
HardA bitonic array first increases then decreases. How fast can you find a given value?
- A.
O(n)
- B.
O(log n): find the peak, then binary search each side
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Searching and Binary Search question
A bitonic array first increases then decreases. How fast can you find a given value?
O(n)
O(log n): find the peak, then binary search each side
Sign up free to see the answer and a step-by-step explanation.
O(n log n)
O(1)