Build your intuition. Click the correct answer from the options.
What is the purpose of segment trees?
Click the option that best answers the question.
- To efficiently handle range-based queries on arrays
- To sort arrays in ascending order
- To find the middle element in an array
- To count the number of elements in an array