# Category Archives: Algorithms (adsbygoogle = window.adsbygoogle || []).push({});

## Game Theory (Normal-form game) | Set 3 (Game with Mixed Strategy)

Consider the following payoff matrix with respect to player A and solve it optimally. Solution: If a game has no saddle point then the game… Read More »

## How to learn Pattern printing easily?

The task is to print a pattern as shown in the example for a given integer value. The goal is not to print just this… Read More »

## Minimum number of Bottles visible when a bottle can be enclosed inside another Bottle

Given N bottles. The ith bottle has A[i] radius. Once a bottle is enclosed inside another bottle, it ceases to be visible. The task is… Read More »

## Roots of the quadratic equation when a + b + c = 0 without using Shridharacharya formula

Given three integers a, b and c such that a + b + c = 0. The task is to find the roots of a… Read More »

## Nearest greater number by interchanging the digits

Given two integers A and B. The task is to find the nearest greater value to B by interchanging the digits of A. If no… Read More »

## Find the smallest positive number missing from an unsorted array | Set 3

Given an unsorted array with both positive and negative elements. The task is to find the smallest positive number missing from the array. Examples: Input:… Read More »

## Find the winner of the match | Multiple Queries

Given an array of pairs arr of size N which represents a game situation where the first player wins against the second player. Given multiple… Read More »

## Longest alternative parity subsequence

Given an array a of size N. The task is to print the length of the longest alternative odd/even or even/odd subsequence. Examples: Input: a[]… Read More »

## Find the number of cells in the table contains X

Given two integer N and X. N represents the number of rows and columns of a table. And the element at the ith row and… Read More »

## Find the number of pair of Ideal nodes in a given tree

Given a tree of N nodes and an integer K, each node is numbered between 1 and N. The task is to find the number… Read More »

## Game Theory (Normal form game) | Set 2 (Game with Pure Strategy)

Game Theory (Normal – form game) | Set 1 (Introduction) Please go through the above article before proceeding. Given a payoff matrix. The task is… Read More »

## Subsequence X of length K such that gcd(X, X) + (X, X) + … is maximized

Given an array a of size N. The task is to find a subsequence X of length K such that gcd(X, X) + (X, X)… Read More »

## Find maximum meetings in one room

There is one meeting room in a firm. There are N meetings in the form of (S[i], F[i]) where S[i] is the start time of… Read More »

## Game Theory (Normal – form game) | Set 1 (Introduction)

Game theory is a mathematical model used for decision making. It has applications in all fields of social science, as well as in logic and… Read More »

## Lexicographically Smallest Topological Ordering

Given a directed graph with N vertices and M edges that may contain cycles, the task is to find the lexicographically smallest topological ordering of… Read More »