Given three integers a, b, and N. The task is to find minimum addition operations between a and b, such that after applying the operations,… Read More

# Category Archives: Game Theory

Given a positive integer N. In one operation subtract N with its highest divisor other than N and 1. The task is to find minimum… Read More

Given two positive integers A and B. The task is to minimize operations required to reduce A and B to 1. There are two types… Read More

In this article, we are going to see how to create Monty Hall games using Pygame in Python. Monty Hall was a game show of… Read More

Given two integers A and B, the task is to convert the given two integers to zero at minimal cost by performing the following two… Read More

Given an array arr of length N with values 1 and 2 indicating type 1 and type 2 elements and two players, player1 and player2.… Read More

Given two integers K and N, and also given that Alice and Bob are playing a game. In a single move, a player can choose… Read More

Given 3 integers a, b and c indicating number of candies present in three bags. You need to find whether we can empty all the… Read More

Minimize steps to form string S from any random string of length K using a fixed length subsequences

Given a string S consisting of N characters and a positive integer K, the task is to find the minimum number of operations required to… Read More

Given the current position of a Knight as (i, j), find the count of different possible positions visited by a knight after N moves (in… Read More

Given an integer N, find the minimum number of operations to change N to 1. If not possible, print -1. One operation is defined as… Read More

Given two numbers N and M, the task is to find the minimum number of moves to change N to M or -1 if it’s… Read More

Given a binary string S of length N, the task is to find lexicographically the smallest string formed after modifying the string by selecting any… Read More

There are many ways of classifying algorithms and a few of them are shown below: Implementation Method Design Method Other Classifications Classification by Implementation Method:Attention… Read More

Given an array, arr[] of M integers, where the ith element represents the time after which the ith bomb will blast after dropping it, and… Read More