Data Structures & AlgorithmsHardICPC regional · data structures

Problem: Which statement about Fenwick (binary indexed) trees is false?

  1. A. They answer range-minimum queries directly, with the same O(log n) structure as range-sum queries
  2. B. They support point updates and prefix sums in O(log n)
  3. C. They use O(n) memory
  4. D. They are built in O(n) time

Correct answer: A. They answer range-minimum queries directly, with the same O(log n) structure as range-sum queries

Fenwick trees work because sums are invertible, so a range sum equals a difference of prefixes. Minimum has no inverse, so the same structure does not answer range minimum queries.

More Coding Interview Problems questions

Exams that ask this topic