Skip to content

Tag Archives: Segment-Tree

Given two arrays A[] and B[] consisting of N integers and an integer K, the task is to find the maximum value of B[i] +… Read More
Given an array arr[] of size N and a 2D array Q[][], consisting of queries of the following two types: 1 X Val: Update arr[X]… Read More
Given a binary array arr[] of size N and a 2D array Q[][] containing K queries of the following two types: 1 : Print the… Read More
Given two arrays arr[] and query[] of sizes N and Q respectively and an integer M, the task for each query, is to count the… Read More
Given a string str, consisting of lowercase English alphabets, the task is to calculate the sum of indices(1-based indexing) of the characters removed to obtain… Read More
Given a string S of Size N. Initially, the value of count is 0. The task is to find the value of count after N… Read More
Given an array A[], for each element in the array, the task is to find the sum of all the previous elements which are strictly… Read More

Start Your Coding Journey Now!