## Making elements of two arrays same with minimum increment/decrement

Given two arrays of same size, we need to convert the first array into another with minimum operations. In an operation, we can either increment… 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?
- Setting up a C++ Competitive Programming Environment
- Basic Algorithm Techniques Not Taught in Academics
- Logarithm tricks for Competitive Programming
- Writing code faster during Competitive Programming in C++
- Count of subarrays of an Array having all unique digits
- Print all possible combinations of the string by replacing '$' with any other digit from the string
- Check if sum of Fibonacci elements in an Array is a Fibonacci number or not
- Default values in a Map in C++ STL
- Move all zeroes to end of array using Two-Pointers
- How To Approach A Coding Problem ?
- Count the number of ways to construct the target string
- Sum of GCD of all possible sequences
- Minimize the maximum difference of adjacent elements after at most K insertions
- Kth most frequent Character in a given String
- Count of substrings of length K with exactly K distinct characters
- Maximum LCM among all pairs (i, j) from the given Array
- Count of subarrays which start and end with the same element
- Minimum cost of reducing Array by merging any adjacent elements repetitively
- Finding Median of unsorted Array in linear time using C++ STL
- Submatrix of given size with maximum 1's
- Important functions of STL Components in C++
- Longest Mountain Subarray

Given two arrays of same size, we need to convert the first array into another with minimum operations. In an operation, we can either increment… Read More »

Given an array of even number of elements, form groups of 2 using these array elements such that the difference between the group with highest… Read More »

Given an array and a value k. We have to find the maximum number of equal elements possible for the array so that we can… Read More »

Given an array of even number of elements, form groups of 2 using these array elements such that the difference between the group with the… Read More »

Vantieghems Theorem is a necessary and sufficient condition for a number to be prime. It states that for a natural number n to be prime,… Read More »

Given a set of N elements such that N, task is to generate an array such that the GCD of any subset of the generated… Read More »

Given a rectangular matrix M[0…n-1][0…m-1], and queries are asked to find the sum / minimum / maximum on some sub-rectangles M[a…b][e…f], as well as queries… Read More »

An ordered tree is an oriented tree in which the children of a node are somehow ordered. It is a rooted tree in which an… Read More »

The sequence first consists of all the odd numbers starting from 1 to n and then remaining even numbers starting 2 up to n. Let’s… Read More »

Given a text and a wildcard pattern, find if wildcard pattern is matched with text. The matching should cover the entire text (not partial text).… Read More »

A Multistage graph is a directed graph in which the nodes can be divided into a set of stages such that all edges are from… Read More »

Given a number n, the task is to find the largest perfect cube that can be formed by deleting minimum digits(possibly 0) from the number.… Read More »

Given a string of brackets, task is to find the number of pairs of brackets involved in a balanced sequence in a given range. Examples… Read More »

Given a integer n, we need to find how many digits remove from the number to make it a perfect square. Examples : Input :… Read More »

Prerequisites: Disjoint Set Data Structure Set Unordered_Map Disjoint Set data structure is used to keeps track of a set of elements partitioned into a number… Read More »