## Possible cuts of a number such that maximum parts are divisible by 3

Given a Large number N ( number of digits in N can be up to 105). The task is to find the cuts required of… Read More »

## Minimum steps required to convert X to Y where a binary matrix represents the possible conversions

Given a binary matrix of size NxN where 1 denotes that the number i can be converted to j, and 0 denotes it cannot be… Read More »

## Check if a word exists in a grid or not

Given a 2D grid of characters and a word, the task is to check if that word exists in the grid or not. A word… Read More »

## Minimum distance to the end of a grid from source

Given a binary grid of order r * c and an initial position. The task is to find the minimum distance from the source to… Read More »

## Count number of paths whose weight is exactly X and has at-least one edge of weight M

Given an infinite tree and three numbers N, M, and X which has exactly N child from every node. Every edge has a weight of… Read More »

## Count of Numbers in a Range divisible by m and having digit d in even positions

Given a range represented by two positive integers l and r and two integers d and m. Find the count of numbers lying in the… Read More »

## Count of Numbers in Range where the number does not contain more than K non zero digits

Given a range represented by two positive integers L and R and a positive integer K. Find the count of numbers in the range where… Read More »

## Minimum Operations to make value of all vertices of the tree Zero

Given a tree, where each vertex V has a value A[V] stored in it. The task is to find the minimum number of operations required… Read More »

## Count of Numbers in a Range where digit d occurs exactly K times

Given two positive integers L and R which represents a range and two more positive integers d and K. The task is to find the… Read More »

## Sum of kth powers of first n natural numbers

Given two integers n and k, the task is to calculate and print 1k + 2k + 3k + … + nk. Examples: Input: n… Read More »

## Minimum number of operations required to sum to binary string S

Given a binary string S. Find the minimum number of operations required to be performed on the number zero to convert it to the number… Read More »

## Count of Numbers in Range where first digit is equal to last digit of the number

Given a range represented by two positive integers L and R. Find the count of numbers in the range where the first digit is equal… Read More »

## Predict the winner of the game | Sprague-Grundy

Given a 4×4 binary matrix. Two players A and B are playing a game, at each step a player can select any rectangle with all… Read More »

## Form N-copy string with add, remove and append operations

A string is called a N-copy string when it is formed by N copies of letter ‘G’. ie “GGGG” is a 4-copy string since it… Read More »

## Ways to fill N positions using M colors such that there are exactly K pairs of adjacent different colors

Given three integers N, M and K. The task is to find the number of ways to fill N positions using M colors such that… Read More »