## Lazy Propagation in Segment Tree | Set 2

Given an array arr[] of size N. There are two types of operations: Update(l, r, x) : Increment the a[i] (l <= i <= r)… Read More »

- Must do Math for Competitive Programming
- Which C++ libraries are useful for competitive programming?
- Breadth First Search without using Queue
- 7 Best Coding Challenge Websites in 2020
- Minimize the maximum difference between adjacent elements in an array
- Which Java libraries are useful for competitive programming?
- Speed up Code executions with help of Pragma in C/C++
- Which Python Modules are useful for competitive programming?
- Logarithm tricks for Competitive Programming
- Setting up a C++ Competitive Programming Environment
- Basic Algorithm Techniques Not Taught in Academics
- Writing code faster during Competitive Programming in C++
- Print all possible combinations of the string by replacing '$' with any other digit from the string
- Count of subarrays of an Array having all unique digits
- Check if sum of Fibonacci elements in an Array is a Fibonacci number or not
- Default values in a Map in C++ STL
- Count the number of ways to construct the target string
- Move all zeroes to end of array using Two-Pointers
- How To Approach A Coding Problem ?
- Sum of GCD of all possible sequences
- Kth most frequent Character in a given String
- Minimize the maximum difference of adjacent elements after at most K insertions
- Count of substrings of length K with exactly K distinct characters
- Maximum LCM among all pairs (i, j) from the given Array
- Minimum cost of reducing Array by merging any adjacent elements repetitively
- Count of subarrays which start and end with the same element
- Finding Median of unsorted Array in linear time using C++ STL
- Important functions of STL Components in C++
- Competitive Programming vs Software Development - Where Should I Invest My Time?
- Shortest path in a directed graph by Dijkstra’s algorithm

Given an array arr[] of size N. There are two types of operations: Update(l, r, x) : Increment the a[i] (l <= i <= r)… Read More »

Given three integers N, X and Y. The task is to find N positive integers that satisfy the given equations. a12 + a22 + ….… Read More »

Given a very large number N. The task is to find (1n + 2n + 3n + 4n) mod 5. Examples: Input: N = 4… Read More »

Given a permutation P (P1, P2, P3, … Pn) of first n natural numbers. Find the minimum number of operations to convert it into an… Read More »

Given an array arr[] containing GCD of every possible pair of elements of another array. The task is to find the original numbers which are… Read More »

Given a mat[][] of size n X n, the task is to find an element X such that if the anti-clockwise traversal is begun from… Read More »

Given an array arr[] of size n where arr[i] is the amount of candies of type i. You have unlimited amount of money. The task… Read More »

Given an array arr[] of size n, The task is to replace every element of the array by the sum of next two consecutive elements… Read More »

Given an undirected unweighted connected graph consisting of n vertices and m edges. The task is to find any spanning tree of this graph such… Read More »

Given an integer k and an array arr[], the task is to count the number of sub-arrays which have the sum equal to some positive… Read More »

Given two strings s1 and s2 consisting of lowercase English alphabets, the task is to count all the pairs of indices (i, j) from the… Read More »

Given the count of digits 1, 2, 3, 4. Using these digits you are allowed to only form numbers 234 and 12. The task is… Read More »

Given an integer N, the task is to print a good permutation of first N natural numbers. Let’s denote the ith element of the permutation… Read More »

Given an integer N(1<=N<=10^9). The task is to represent N as a sum of the maximum possible number of composite summands and print this maximum… Read More »

Given a number N(1<=N<=2000)., The task is to find the number strings of size N that can be obtained after using characters from 'a' to… Read More »