Given two numbers L and R, the task is to find two distinct minimum positive integers X and Y such that whose LCM lies in… Read More

# Category Archives: Competitive Programming

Given an array arr[] of N positive integers and an integer K., The task is to create a set of prime numbers such that the… Read More

Given an array A[] of N integers, the task is to find the relative rank for each element in the given array. The relative rank… Read More

Given a number N, the task is to find two numbers a and b such that a + b = N and LCM(a, b) is… Read More

Given a number N and for any number K for a series formed as K, K + 1, K + 2, K + 3, K… Read More

Given an integer array arr[] of size N, the task is to construct an array consisting of N+1 strings of length N such that arr[i]… Read More

Given a string str, the task is to find the number of distinct substrings that are placed consecutively in the given string. Examples: Input: str… Read More

Given a number N, the task is to calculate the total number of corresponding different bit in the binary representation for every consecutive number from… Read More

Competitive Programming….what comes to your mind first…? most probably you associate the idea of solving the coding questions on GeeksforGeeks, Codechef, Topcoder, Codeforces, Hackerrank, etc.… Read More

Given an N-ary Tree rooted at 1, and an array val[] consisting of weights assigned to every node, and a matrix Q[][], consisting of queries… Read More

Given a 2D matrix tsp[][], where each row has the array of distances from that indexed city to all the other cities and -1 denotes… Read More

Given N people standing in a queue and two arrays A[] and B[]. The array A[] represent the name of the person and array B[]… Read More

Given a string S, the task is to check if S contains a pair of substrings of length K which are anagrams of each other… Read More