Saved Bookmarks
| 1. |
Define Segment Tree data structure and its applications. |
|
Answer» A segment Tree is a binary tree that is used to store intervals or segments. The Segment Tree is made up of nodes that represent intervals. Segment Tree is used when there are multiple range queries on an array and changes to array elements. The segment tree of array A[7] will look like this: Following are key operations performed on the Segment tree data structure:
Following are real-time applications for Segment Tree:
|
|