1. Home
  2. Computer Science MCQs
  3. Algorithms and Data Structures
  4. Which data structure provides efficient range queries with…

Added 12 Sep 2025

Which data structure provides efficient range queries with O(log n) time for updates and queries?

  1. Fenwick Tree
  2. Segment Tree Correct answer
  3. Binary Indexed Tree
  4. Sparse Table

Correct answer

B. Segment Tree

14 views

MCQSEXAM

Explanation

Segment trees support range queries and updates in O(log n) time.

Reference

Asked in: GATE CS, UGC NET CS

https://www.geeksforgeeks.org/segment-tree-data-structure/

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Algorithms and Data Structures MCQs

Practise all Algorithms and Data Structures MCQs

Similar MCQs