## Nearest prime number in the array of every array element

Given an integer array arr[] consisting of N integers, the task is to find the nearest Prime Number in the array for every element in… 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
- Longest Mountain Subarray
- Length of the smallest substring which contains all vowels
- Find distance between two nodes in the given Binary tree for Q queries
- Count of substrings of length K with exactly K distinct characters
- 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

Given an integer array arr[] consisting of N integers, the task is to find the nearest Prime Number in the array for every element in… Read More »

Given three integers A, B and C, the task is to find the length of a race track if 3 racers are competing in a… Read More »

Given x coordinates of N vertical lines (parallel to Y-axis) and M line segments extending from (x1, y1) to (x2, y2), the task is to… Read More »

Given three integers N, M and K, where N and M are the dimensions of the matrix and K is the maximum possible steps, the… Read More »

Given two arrays a[] and b[] which contains the integer elements and their respective types (either type 0 or type 1) respectively, the task is… Read More »

Given a binary string S, the task is to count the minimum number of jumps required to group all 1’s together. Examples: Input: S =… Read More »

Given an array arr[] of N integers, the task is to print the subsequence from the given array with the maximum pairwise absolute difference of… Read More »

Given an array arr[] consisting of N integers, the task is to count all the subarrays which are Bitonic in nature. A bitonic subarray is… Read More »

Given a binary valued undirected graph with V vertices and E edges, the task is to find the hexadecimal equivalents of all the connected components… Read More »

Given a non-empty string S, the task is to print the longest subsequence from the string S which contains alternating vowels and consonants. Note: If… Read More »

Given an array arr[] of integers, the task is to check if it is possible to obtain a subsequence of K elements from the array… Read More »

Given a non-negative integer N, the task is to find the Nth row of Pascal’s Triangle. Note: The row index starts from 0. Pascal’s Triangle:… Read More »

Given three integers N, K and M representing the Number of boxes (aligned horizontally from 1 to N), total numbers of allowed jumps and total… Read More »

Given a string str consist of only lowercase alphabets and an integer K, the task is to count the number of substrings of size K… Read More »

Given an array arr[] of N integers, the task is to split the array into two subsets such that the absolute difference between the maximum… Read More »