## Find the minimum number of preprocess moves required to make two strings equal

Given two strings A and B of equal lengths consisting of lower case English letters. The task is to count the minimum number of pre-processing… Read More »

## Maximize big when both big and small can be exchanged

Given N Big Candies and M Small Candies. One Big Candy can be bought by paying X small candies. Alternatively, one big candy can be… Read More »

## Number of wins for each player in a series of Rock-Paper-Scissor game

Two players are playing a series of games of Rock–paper–scissors. There are a total of K games played. Player 1 has a sequence of moves… Read More »

## Filling diagonal to make the sum of every row, column and diagonal equal of 3×3 matrix

Given 9 elements in a 3 x 3 matrix where the value of diagonals are 0. We need to find the values in diagonal to… Read More »

## Count number of trailing zeros in (1^1)*(2^2)*(3^3)*(4^4)*..

Given an integer n, the task is to find the number of trailing zeros in the function i.e. f(n) = 11 * 22 * 33… Read More »

## Program for K Most Recently Used (MRU) Apps

Given an integer K and an array arr[] of N integers which contains the ids of the opened apps in a system where arr is… Read More »

## Pizza Problem

Given an integer N and a pizza which can be cut into pieces, each cut should be a straight line going from the center of… Read More »

## Count the number of survivors

Given a matrix mat[][] containing the characters [1 – 9], P and * where P is a person and * is an empty space. An… Read More »

## Generate lexicographically smallest string of 0, 1 and 2 with adjacent swaps allowed

Given a string str containing only characters 0, 1 and 2, you can swap any two adjacent (consecutive) characters 0 and 1 or any two… Read More »

## Find safe cells in a matrix

Given a matrix mat[][] containing the characters Z, P and * where Z is a zombie, P is a plant and * is a bare… Read More »

## Print n 0s and m 1s such that no two 0s and no three 1s are together

Given two integers n and m where n is the number of 0s and m is the number of 1s. The task is to print… Read More »

## Find the non decreasing order array from given array

Given an array A[] of size N / 2, the task is to construct the array B[] of size N such that: B[] is sorted… Read More »

## Buy minimum items without change and given coins

You have an unlimited number of 10-rupee coins and exactly one coin of r rupee and you need to buy minimum items each of cost… Read More »

## A Sum Array Puzzle

Given an array arr[] of n integers, construct a Sum Array sum[] (of same size) such that sum[i] is equal to the sum of all… Read More »

## Jump in rank of a student after updating marks

Given three arrays names[], marks[] and updates[] where: names[] contains the names of students. marks[] contains the marks of the same students. updates[] contains the… Read More »