# Category Archives: Competitive Programming

Given a string s of size N. The task is to find lexicographically all shortest palindromic substrings from the given string. Examples: Input: s= “programming”… Read More
Given three positive integers X, Y and Z, the task is to count the minimum numbers of bits required to be flipped in X and… Read More
In this article we will learn about how to setup a all in one Competitive Programming Environment Operating System It is always recommended to use… Read More
Given a number N, the task is to print all distinct divisors of N2.Examples:  Input: N = 4 Output: 1 2 4 8 16 Explanation:N = 4,… Read More
Given an array arr of size N and Q queries of the form [L, R], the task is to find the number of divisors of… Read More
Given an array arr[] of N elements, the task is to answer Q queries each having two integers L and R. For each query, the… Read More
Given an array A, consisting of N non-negative integers, find the sum of xor of all unordered triplets of the array. For unordered triplets, the… Read More
Given an array of random numbers, Push all the zero’s of the given array to the end of the array. For example, if the given… Read More
Given three integers the lower range L ,the upper range U and a digit M. The task is to count all the numbers between L… Read More
Given an array of Number and two values A and B, The task is to check the following Conditions: If two numbers are present in… Read More
Given a Number N. The task is to unset the rightmost set bit of N. Examples: Input: N = 5 Output: 4 Explanation: 101(5) ->… Read More
Given a string of digits S. The task is to insert a minimum number of opening and closing parentheses into the string S such that… Read More
Given segments and some points, for each point find the number of segments covering that point. A segment (l, r) covers a point x if… Read More
Given an array Arr of N integers and Q queries, each query having a range from L to R. Find the element having maximum digit… Read More
Given a binary array arr[] of size N. The task is to answer Q queries which can be of any one type from below: Type 1… Read More