Dynamic Programming21 sections · 916 units
Open in Course

Quiz: Nested Binary Search

Multi-constraint handling

Check Your Understanding

In nested binary search for 2D Aliens, what is time complexity compared to naive O(n * K1 * K2)?

  1. A.O(n^2 * log(K1 * K2))
  2. B.O(n * log(maxCost)^2) where each DP solve is O(n)
  3. C.O(n * K1 * K2 / log(n))
  4. D.O(n * log(K1) * log(K2))
Start the roadmap to answer the quizzes and solve the challenges