## Minimum number of integers required to fill the NxM grid

Given a grid of size (NxM) is to be filled with integers. Filling of cells in the grid should be done in the following manner:… Read More »

- Coin game of two corners (Greedy Approach)
- Predict the winner of the game | Sprague-Grundy
- Maximum and minimum isolated vertices in a graph
- Josephus Problem | (Iterative Solution)
- Count the numbers that can be reduced to zero or less in a game
- Find the winner by adding Pairwise difference of elements in the array until Possible
- Find the winner of the game with N piles of boxes
- Find probability that a player wins when probabilities of hitting the target are given
- A modified game of Nim
- Minimum number of integers required to fill the NxM grid

Given a grid of size (NxM) is to be filled with integers. Filling of cells in the grid should be done in the following manner:… Read More »

Given an array arr[] of integers, two players A and B are playing a game where A can remove any number of non-zero elements from… Read More »

Given an array arr[] of positive distinct integers, two players A and B are playing a game. At each move, a player selects two numbers… Read More »

Given two integers X and Y and an array of N integers. Player A can decrease any element of the array by X and Player… Read More »

Given four integers p, q, r and s. Two players are playing a game where both the players are hitting a target and the first… Read More »

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 »

Given N piles containing White(W) and Black(B) boxes only, two players A and B play a game. Player A may remove any number of boxes… Read More »

Given ‘n’ vertices and ‘m’ edges of a graph. Find the minimum number and maximum number of isolated vertices that are possible in the graph.… Read More »

Consider a two player coin game where each player gets turn one by one. There is a row of even number of coins, and a… Read More »

There are N Children are seated on N chairs arranged around a circle. The chairs are numbered from 1 to N. The game starts going… Read More »

You are given an array A[] of n-elements. There are two players Alice and Bob. A Player can choose any of element from array and… Read More »

In Game of Nim, two players take turns removing objects from heaps or the pile of stones. Suppose two players A and B are playing… Read More »

Three players P1, P2 and P3 are playing a game. But at a time only two players can play the game, so they decided, at… Read More »

Prerequisites: Sprague Gruncy theorem Grundy Numbers Nim is a famous game in which two players take turns removing items from distinct piles. During each turn,… Read More »

There are two players A and B who are interested in playing a game of numbers. In each move a player pick two distinct number,… Read More »