## Print steps to make a number in form of 2^X – 1

Given a number N, there are two steps to be performed. At odd step, XOR the number with any 2^M-1, where M is chosen by… Read More »

- What is Competitive Programming and How to Prepare for It?
- Why Should I Learn Coding?
- Lexicographically Smallest Topological Ordering
- Find the number of pair of Ideal nodes in a given tree
- Sum of digits with even number of 1's in their binary representation
- Equal Sum and XOR of three Numbers
- Check which player visits more number of Nodes
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Make the list non-decreasing by changing only one digit of the elements
- Print the path between any two nodes of a tree | DFS
- Convert an unbalanced bracket sequence to a balanced sequence
- Nth XOR Fibonacci number
- Write a function to get the intersection point of two Linked Lists | Set 2
- Print all the permutation of length L using the elements of an array | Iterative
- Number of substrings that start with "geeks" and end with "for"
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Reversing a Queue using another Queue
- Minimum increment or decrement operations required to make the array sorted
- Check if the rows of a binary matrix can be made unique by removing a single column
- Number of Subarrays with positive product
- Queries for the minimum element in an array excluding the given index range
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Print nodes having maximum and minimum degrees
- Color all boxes in line such that every M consecutive boxes are unique
- Minimize the sum of the array according the given condition
- Count of triples (A, B, C) where A*C is greater than B*B
- Find two co-prime integers such that the first divides A and the second divides B
- Sum of all natural numbers from L to R ( for large values of L and R )

Given a number N, there are two steps to be performed. At odd step, XOR the number with any 2^M-1, where M is chosen by… Read More »

Given an array of strings arr[] and given some queries where each query consists of a string str and an integer k. The task is… Read More »

Given a string S, the task is to check if we can make the string lexicographically smaller by reversing any sub-string of the given string.… Read More »

Just like base 2 Binary numeral system having 0s and 1s as digits, Ternary(Trinary) Numeral System is a base 3 number system having 0s, 1s… Read More »

Given a binary string str, the task is to find the largest power of 2 that divides the decimal equivalent of the given binary number.… Read More »

Given two integers K and N, the task is to count the number of ways to arrange K different objects taking N objects at a… Read More »

Given a circular ring which has marking from 1 to N. Given two numbers A and B, you can stand at any place(say X) and… Read More »

Given a 2-D array of order N X M array elements, the task is to check if we can select a number from every row… Read More »

Given two arrays A[] and B[] of N and M integers respectively. Also given is a N X M binary matrix where 1 indicates that… Read More »

Given an array arr[] of N positive integers. The task is to find the maximum possible value of a[i] % a[j] over all pairs of… Read More »

Given an integer N. The task is to find the number of divisors of all the numbers in the range [1, N]. Examples: Input: N… Read More »

Given an array arr[] containing the permutation of first N natural numbers and an integer M ≤ N. The task is to find the number… Read More »

Given an array of N integers. The task is to find the maximum difference between the index of any two different numbers. Note that there… Read More »

Interactive Problems are those problems in which our solution or code interacts with the judge in real time. When we develop a solution for an… Read More »

Given an array arr[] of size N. The task is to make all the array elements equal by applying the below operations minimum number of… Read More »