Given two arrays a[] and b[] of size N and an integer K. The task is to find the maximum power that can be achieved… Read More
Category Archives: Game Theory
Given two strings A and B each of length N and an integer K, the task is to find if string A can be converted… Read More
Two players X and Y are picking up numbers alternatively with X picking first. In the first turn X picks 1, then Y picks 2,… Read More
Given an integer N, find the minimum number of operations to reduce N to 1 by using the following two operations: Multiply N by 2… Read More
Given two numbers A and B, the task is to find the minimum number of the following operations to transform A to B: Multiply the… Read More
Given a number N, and some operations that can be performed, the task is to find the minimum number of moves to convert N to… Read More
Given a binary string str consisting of only 0 and 1, where 0 represent an unoccupied position and 1 represent an occupied position. Two players… Read More
Given two integers N and M representing a N x M chessboard, the task is to find the maximum number of squares that the bishop… Read More
Given a string S of size N consisting of ‘0’, ‘1’ and ‘?’, where N is always even. Divide the string into two different strings… Read More
Given a binary string S of length N and an integer K, the task is to calculate the farthest position that can be reached starting… Read More
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
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