## Minimum number of operations on a binary string such that it gives 10^A as remainder when divided by 10^B

Given a binary string str of length N and two integers A and B such that 0 ≤ A < B < n. The task… Read More »

- Count common characters in two strings
- Sort an array without changing position of negative numbers
- Nth number whose sum of digit is multiple of 10
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Interactive Problems in Competitive Programming
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Program to find the kth character after decrypting a string
- Find the minimum number of operations required to make all array elements equal
- Maximize the happiness of the groups on the Trip
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Find the number of pair of Ideal nodes in a given tree
- Find the minimum number of elements that should be removed to make an array good
- Sum of digits with even number of 1's in their binary representation
- Find sub-arrays from given two arrays such that they have equal sum
- Count of all possible values of X such that A % X = B
- Equal Sum and XOR of three Numbers
- Lexicographically Smallest Topological Ordering
- Lazy Propagation in Segment Tree | Set 2
- Convert the undirected graph into directed graph such that there is no path of length greater than 1
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Replace array elements by sum of next two consecutive elements
- Number of ways of scoring R runs in B balls with at most W wickets
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Find the weight of the minimum spanning tree

Given a binary string str of length N and two integers A and B such that 0 ≤ A < B < n. The task… Read More »

Given two integers N and K, the task is to check whether N can be represented as sum of K distinct positive integers. Examples: Input:… Read More »

Given two integers a and b, the task is to check whether the product of integers from the rage v[a, b] i.e. a * (a… Read More »

Given an integer K and a range [L, R], the task is to count the quadruplet pairs from the given range having gcd equal to… Read More »

Given a N * N chessboard, the task is to count the number of squares having the odd side length. Example: Input: N = 3… Read More »

Given a range [L, R] where 0 ≤ L ≤ R ≤ 108. The task is to find the count of integers from the given… Read More »

Given two arrays A[] and B[] of equal sizes i.e. N containing integers from 1 to N. The task is to find sub-arrays from the… Read More »

Given two integer N and K, the task is to find the permutation P of first N natural numbers such that there are exactly K… Read More »

Given an array of size N in which initially all the elements are 0(zero). The task is to count the number of 1’s in the… Read More »

Given two arrays of N and M integers. The task is to find the number of unordered pairs formed of elements from both arrays in… Read More »

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 »