## Maximum of all distances to the nearest 1 cell from any 0 cell in a Binary matrix

Given a Matrix of size N*N filled with 1‘s and 0‘s, the task is to find the maximum distance from a 0-cell to its nearest… Read More »

- Must do Math for Competitive Programming
- Which C++ libraries are useful for competitive programming?
- Breadth First Search without using Queue
- Minimize the maximum difference between adjacent elements in an array
- 7 Best Coding Challenge Websites in 2020
- 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
- Find distance between two nodes in the given Binary tree for Q queries
- Longest Mountain Subarray

Given a Matrix of size N*N filled with 1‘s and 0‘s, the task is to find the maximum distance from a 0-cell to its nearest… Read More »

Given a number N, the task is to find the sum of all N digits palindromic numbers (formed by digits from 1 to 9) that… Read More »

This article focuses on how to implement your solutions and implement them fast while doing competitive programming. Setup Please refer Setting up a C++ Competitive… Read More »

Given a Prufer sequence of a Tree, the task is to print the nodes with prime-degree in this tree. Examples: Input: arr[] = {4, 1,… Read More »

Given two integers, X and K, the task is to find if X2 is divisible by K or not. Here, both K and X can… Read More »

Given an array arr consisting of N elements and Q queries represented by L and R denoting a range, the task is to print the… Read More »

Given an undirected graph with V vertices and E edges, the task is to find all the connected components of the graph and check if… Read More »

Given an array arr of distinct elements and a list of subsequences seqs of the array, the task is to check whether the given array… Read More »

Given a string str with uppercase characters and an integer K, the task is to find the length of the longest subsequence such that the… Read More »

Given an integer N, the task is to generate a string str which contains maximum possible lowercase alphabets with each of them appearing an odd… Read More »

Given a number as a string where some of the digits are replaced by a ‘$’, the task is to generate all possible number by… Read More »

Given an integer N, the task is to find the minimum cost to merge all the numbers from 1 to N where the cost of… Read More »

Given a positive number N. The task is to find out the smallest perfect square number A such that N + A is also a… Read More »

Given an array arr[], the task is to check if the minimum element in the array is less than or equal to half of every… Read More »

Competitive Programming (CP) doesn’t typically require to know high-level calculus or some rocket science. But there are some concepts and tricks which are sufficient most… Read More »