Count of subsets of integers from 1 to N having no adjacent elements
Given an integer N, the task is to count the number of subsets formed from an array of integers from 1 to N which doesn’t… Read More »
Given an integer N, the task is to count the number of subsets formed from an array of integers from 1 to N which doesn’t… Read More »
Given a positive integer N. Count the total number of ordered sets of any size such that consecutive numbers are not present in the set… Read More »
Given an array arr[], the task is to find the maximum LCM when the elements of the array are taken in pairs. Examples: Input: arr[]… Read More »
Given a list of integer each representing the length of each stick and an integer which tells how many times we can break a stick… Read More »
Many people messaged me how you achieved 4 stars in only 3 contests in a month interval.That sounds amazing! But the reality is I am… Read More »
Given a string S consisting of lower case alphabets of size N and Q queries in the range [L, R], the task is to print… Read More »
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… 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 »