Given an array arr[] of length N, tark is to find the length of longest subarray such that difference of its maximum element and minumum… Read More

# Category Archives: Competitive Programming

Given two integers N and K, the task is to print the number formed by adding product of its max and min digit, K times.… Read More

Given an array arr[] of size N and an array Q[][] consisting of M queries that needs to be processed on the given array. It… Read More

Given an array A containing N integers, the task is to count the number of elements which form a cycle in the array, based on… Read More

Given two array a[] and b[] of size N, the task is to print the count of operations required to make all the elements of… Read More

Given two integers A and N, our task is to find the Nth natural number which is not divisible by A. Examples: Input: A =… Read More

Logarithm: is the inverse function of the exponentiation which means the logarithm value of a given number x is the exponent to another number. Below… Read More

Given a tree with the weights of all the nodes, the task is to find the maximum weighing node whose weight has even digit sum.… Read More

Given a weighted tree, the task is to count the number of nodes whose sum of digits of weights is a Prime Number.Examples: Input: Output:… Read More

Given a graph with N nodes and E edges, the task is to count the number of clique having their size as a prime number… Read More

Given an array arr[] of size N, the task is to find the longest increasing sub-sequence such that index of any element is divisible by… Read More

Given Q queries where each query consists of two numbers L and R which denotes a range [L, R]. The task is to find the… Read More

Given two integers N and K, the task is to represent N as sum of K odd numbers. If it is not possible to create… Read More