Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Competitive Programming
2.3k+ articles
Algorithms
1.9k+ articles
Tree
1.4k+ articles
Recursion
1k+ articles
Advanced Data Structure
580+ articles
array-range-queries
360+ articles
Divide and Conquer
260+ articles
Segment-Tree
140+ posts
Popular Articles
Recent Articles
Segment Tree
Last Updated: 14 December 2024
Segment Tree is a data structures that allows efficient querying and updating of intervals or segments of an array. It is particularly usefu
...read more
Tree
Huawei
Segment-Tree
Uber
TCS-coding-questions
DSA
Introduction to Segment Trees - Data Structure and Algorithm Tutorials
Last Updated: 14 December 2024
A Segment Tree is used to stores information about array intervals in its nodes.It allows efficient range queries over array intervals.Along
...read more
Tree
Segment-Tree
Picked
DSA
Tutorials
Segment tree | Efficient implementation
Last Updated: 20 January 2025
Let us consider the following problem to understand Segment Trees without recursion.We have an array arr[0 . . . n-1]. We should be able to,
...read more
Advanced Data Structure
Segment-Tree
DSA
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Competitive Programming
2.3k+ articles
Algorithms
1.9k+ articles
Tree
1.4k+ articles
Recursion
1k+ articles
Advanced Data Structure
580+ articles
array-range-queries
360+ articles
Divide and Conquer
260+ articles
Queries for counts of array values in a given range
Last Updated: 20 March 2025
Given an unsorted array of integers and a set ofmqueries, where each query consists of two integersxandy, the task is to determine the numbe
...read more
Arrays
Amazon
Binary Search
Competitive Programming
Segment-Tree
array-range-queries
DSA
Persistent Segment Tree | Set 1 (Introduction)
Last Updated: 27 January 2023
Prerequisite : Segment Tree Persistency in Data StructureSegment Tree is itself a great data structure that comes into play in
...read more
Tree
Advanced Data Structure
Segment-Tree
array-range-queries
DSA
How to prepare for ACM - ICPC?
Last Updated: 25 May 2023
ACM ICPC(Association for Computing Machinery - International Collegiate Programming Contest) is a worldwide annual multi-tiered programming
...read more
Competitive Programming
ACM-ICPC
Segment-Tree
Binary Indexed Tree
sieve
number-theory
DSA
Min-Max Range Queries in Array
Last Updated: 14 March 2023
Given an array arr[0 . . . n-1]. We need to efficiently find the minimum and maximum value from index qs (query start) to qe (query end) whe
...read more
Advanced Data Structure
Segment-Tree
array-range-queries
DSA
Overview of Graph, Trie, Segment Tree and Suffix Tree Data Structures
Last Updated: 09 February 2023
Introduction:Graph: A graph is a collection of vertices (nodes) and edges that represent relationships between the vertices. Graphs are used
...read more
Trie
Advanced Data Structure
Segment-Tree
Suffix-Tree
DSA
Top 10 Algorithms and Data Structures for Competitive Programming
Last Updated: 10 September 2024
In this post, we will discuss Important top 10 algorithms and data structures for competitive coding.Topics :Graph algorithmsDynamic program
...read more
GBlog
Competitive Programming
BFS
Segment-Tree
Binary Indexed Tree
sieve
Modular Arithmetic
DFS
Topological Sorting
BIT
number-theory
GBlog-Competitive-Programming
DSA
Find LCA in Binary Tree using RMQ
Last Updated: 31 July 2022
The article describes an approach to solving the problem of finding the LCA of two nodes in a tree by reducing it to an RMQ problem.The Lowe
...read more
Tree
Advanced Data Structure
Segment-Tree
LCA
DSA
Range Minimum Query (Square Root Decomposition and Sparse Table)
Last Updated: 25 August 2023
We have an array arr[0 . . . n-1]. We should be able to efficiently find the minimum value from index L (query start) to R (query end) where
...read more
Advanced Data Structure
Competitive Programming
Segment-Tree
array-range-queries
DSA
Lazy Propagation in Segment Tree
Last Updated: 25 April 2023
Segment tree is introduced in previous post with an example of range sum problem. We have used the same "Sum of given Range" problem to expl
...read more
Advanced Data Structure
Segment-Tree
array-range-queries
DSA
Largest Rectangular Area in a Histogram using Segment Tree
Last Updated: 23 February 2023
Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For
...read more
Microsoft
Amazon
Facebook
Snapdeal
Paytm
MAQ Software
Akosha
Stack
Divide and Conquer
Advanced Data Structure
Segment-Tree
DSA
Segment Tree | Range Minimum Query
Last Updated: 11 February 2025
We have introduced a segment tree with a simple example in the previous post. In this post, the Range Minimum Query problem is discussed as
...read more
Tree
Advanced Data Structure
Segment-Tree
array-range-queries
DSA
Segment Tree | Sum of given range
Last Updated: 09 March 2023
Let us consider the following problem to understand Segment Trees.We have an array arr[0 . . . n-1]. We should be able toFind the sum of ele
...read more
Arrays
Tree
Amazon
Mathematical
Advanced Data Structure
Segment-Tree
array-range-queries
DSA
1
2
3
4
5
6
7
8
>>
Last
1
2
3
4
5
6
>>
Last
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !