Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
Competitive Programming
3.3K+ articles
Algorithms
2.0K+ articles
Tree
1.4K+ articles
Recursion
1.0K+ articles
Advanced Data Structure
595+ articles
array-range-queries
376+ articles
Segment-Tree
156+ posts
Recent Articles
Popular Articles
Counting segment inversions of an Array with updates
Last Updated: 06 December 2023
Given an array of small integers arr[] and a 2D array of queries[][], In each query array we have the first element indicating the operation type, and the remaining elemen...
read more
DSA
Arrays
Segment-Tree
inversion
Comparison between Fenwick Tree vs Segment Tree - with Similarities and Differences
Last Updated: 15 September 2023
Fenwick Tree (Binary Indexed Tree) and Segment Tree are both data structures used for efficient range query and update operations on an array. Here's a tabular comparison ...
read more
Tree
Picked
DSA
Segment-Tree
Partitions in Arrays with at least K-Size and M-Difference Rules (Array Partition)
Last Updated: 16 January 2024
Given an array A[] of N integers, find if it is possible to partition the array with following rules:Each element should belong to exactly one partition.Each partition sho...
read more
Competitive Programming
Geeks Premier League
DSA
Arrays
Segment-Tree
Geeks Premier League 2023
Increasing Decreasing Update Queries (Akku and Arrays)
Last Updated: 15 February 2024
Akku has solved many problems, she is a genius. One day her friend gave her an Array of sizes n and asked her to perform some queries of the following type:Each query cons...
read more
Competitive Programming
Geeks Premier League
DSA
Arrays
Segment-Tree
Geeks Premier League 2023
Segment Trees for Competitive Programming
Last Updated: 20 December 2023
Segment Tree is one of the most important data structures used for solving problems based on range queries and updates. Problems based on Segment Trees are very common in ...
read more
Tree
Competitive Programming
DSA
array-range-queries
Segment-Tree
Range Operations and Lazy Propagation for Competitive Programming
Last Updated: 03 May 2024
In competitive programming, mastering range operations and understanding lazy propagation techniques is a crucial skill set for efficiently handling complex problems invol...
read more
Competitive Programming
DSA
Intellipaat
Huawei
Segment-Tree
C++-Misc C++
Algorithms-Graph Traversals
Python numpy-Random
Segment Tree for Range Bitwise OR and Range Minimum Queries
Last Updated: 07 March 2024
There is an array of n elements, initially filled with zeros. The task is to perform q queries from given queries[][] and there are two types of queries, type 1 queries in...
read more
Competitive Programming
Picked
Geeks Premier League
DSA
Segment-Tree
Geeks Premier League 2023
Segment Tree for Range Multiplication and Sum Queries
Last Updated: 18 March 2024
Given an array of size N filled with all 1s, the task is to answer Q queries, where the queries can be one of the two types: Type 1 (1, L, R, X): Multiply all elements on ...
read more
Competitive Programming
Picked
Geeks Premier League
DSA
array-range-queries
Segment-Tree
Geeks Premier League 2023
Segment Tree for Range Addition and Range Minimum Query
Last Updated: 08 March 2024
Given an array of size N initially filled with 0s. There are Q queries to be performed, and each query can be one of two types:Type 1 (1, L, R, X): Add X to all elements i...
read more
Competitive Programming
Picked
Geeks Premier League
DSA
Arrays
Segment-Tree
Geeks Premier League 2023
Segment Tree for Range Assignment and Range Sum Queries
Last Updated: 20 February 2024
Given an array of sizeNfilled with all 0s, the task is to answerQqueries, where the queries can be one of the two types:Type 1 (1, L, R, X):Assign value X to all elements ...
read more
Competitive Programming
Picked
Geeks Premier League
DSA
array-range-queries
Segment-Tree
Geeks Premier League 2023
Range Minimum Query with Range Assignment
Last Updated: 14 February 2024
There is an array of n elements, initially filled with zeros. The task is to perform q queries from given queries[][] and there are two types of queries:Type 1 (i.e querie...
read more
Competitive Programming
Picked
Geeks Premier League
DSA
Arrays
Segment-Tree
Geeks Premier League 2023
Segment Tree
Last Updated: 15 June 2025
Segment Tree is a data structure that allows efficient querying and updating of intervals or segments of an array. It is particularly useful for problems involving range q...
read more
Tree
DSA
Huawei
Segment-Tree
Uber
TCS-coding-questions
Lazy Propagation in Python
Last Updated: 22 May 2024
Segment tree is the data structure that can be used for solving the range queries efficiently. In Segment tree, a single value update in array may cause multiple updates i...
read more
Advanced Data Structure
Picked
DSA
Segment-Tree
Python-DSA
Range Minimum Query (RMQ) in Python
Last Updated: 27 May 2024
Range Minimum Query (RMQ) problem involves finding the minimum value within a specified range of a given array. This problem is used in various fields such as computer sci...
read more
Tree
Picked
DSA
Segment-Tree
Python-DSA
Persistent Segment Tree in Python
Last Updated: 29 May 2024
Persistent data structures are a powerful tool in computer science, enabling us to maintain and access multiple versions of a data structure over time. One such structure ...
read more
Tree
Picked
DSA
Segment-Tree
Python-DSA
1
2
3
4
...
11
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 !