## Generate a string of size N whose each substring of size M has exactly K distinct characters

Given 3 positive integers N, M and K. the task is to construct a string of length N consisting of lowercase letters such that each… Read More »

- Must do Math for Competitive Programming
- Which C++ libraries are useful for competitive programming?
- Breadth First Search without using Queue
- Which Java libraries are useful for competitive programming?
- Minimize the maximum difference between adjacent elements in an array
- 7 Best Coding Challenge Websites in 2020
- Which Python Modules are useful for competitive programming?
- Speed up Code executions with help of Pragma in C/C++
- Basic Algorithm Techniques Not Taught in Academics
- Setting up a C++ Competitive Programming Environment
- Writing code faster during Competitive Programming in C++
- Check if sum of Fibonacci elements in an Array is a Fibonacci number or not
- Count of subarrays of an Array having all unique digits
- Logarithm tricks for Competitive Programming
- Default values in a Map in C++ STL
- Move all zeroes to end of array using Two-Pointers
- Sum of GCD of all possible sequences
- How To Approach A Coding Problem ?
- Minimize the maximum difference of adjacent elements after at most K insertions
- Maximum LCM among all pairs (i, j) from the given Array
- Count of subarrays which start and end with the same element
- Submatrix of given size with maximum 1's
- Kth most frequent Character in a given String
- Length of the smallest substring which contains all vowels
- Longest Mountain Subarray
- Find distance between two nodes in the given Binary tree for Q queries
- Find maximum subset sum formed by partitioning any subset of array into 2 partitions with equal sum
- Find last remaining element after reducing the Array
- Queries for elements having values within the range A to B in the given index range using Segment Tree
- Count of substrings of length K with exactly K distinct characters

Given 3 positive integers N, M and K. the task is to construct a string of length N consisting of lowercase letters such that each… Read More »

Given an array arr[] of N integers, the task is to perform the following two queries: query(start, end): Print the number of fibonacci numbers in… Read More »

Given a Complete Binary Tree, the task is to print the elements in the Clockwise traversal order. Clockwise Traversal of a tree is defined as:… Read More »

In the previous article, we have discussed that C++, Java and Python are three most common languages for competitive programming. In this article, we are… Read More »

Given two integers N and K, the task is to generate a series of N terms in which every term is sum of the previous… Read More »

Given two numbers N and K. A sequence A1, A2, ….AN of length N can be created by placing numbers from 1 to K at… Read More »

Prerequisite: Map in STL A map is a container which is used to store a key-value pair. By default, In Primitive datatypes such as int,… Read More »

Prerequisites: Segment Tree Given a number N which represents the size of the array initialized to 0 and Q queries to process where there are… Read More »

Prerequisite: Segment Trees Given a binary array arr[] consisting of only 0’s and 1’s and a 2D array Q[][] consisting of K queries, the task… Read More »

Given an array arr[] of size N and an integer K. The task is to find the last remaining element in the array after reducing… Read More »

Given an array arr[] of size N and a set Q[][] containing M queries, the task is to execute the queries on the given array… Read More »

Given a tree with N vertices numbered [0, n – 1], K vertices and a distance D, the task is to find whether there is… Read More »

Given a grid A of size N*M consisting of K cells denoted by values in range [1, K], some blocked cells denoted by -1 and… Read More »

C++ is one of the most recommended languages in competitive programming (please refer our previous article for the reason) C++ STL contains lots of containers… Read More »

Java is one of the most recommended languages in competitive programming (please refer a previous article for more details) Java Collection framework contains lots of… Read More »