Arnab Chakraborty has Published 4452 Articles

Program to find number of starting point from where we can start travelling in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 23-Oct-2021 07:13:46

394 Views

Suppose there are n cities numbered from 0 to n-1 and there are n directed roads. We can travel from city i to city (i + 1) % n [0 to 1 to 2 to .... to N - 1 to 0]. We have a car. The capacity of our ... Read More

Program to check robbers can rob the vault or not in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 23-Oct-2021 07:11:05

55 Views

Suppose there are N number of robbers are trying to rob a vault. There was a guard but he went out for G amount of time, after that he will come back. And each robber has specific time to rob the vault, but at most two of them can enter ... Read More

Program to find maximum score of brick removal game in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 23-Oct-2021 07:03:30

165 Views

Suppose Amal and Bimal are playing a game. They have an array nums which determines n bricks with numbered on top of it. In this game, players can alternatively remove one, two or three bricks from the top, and the numbers marked on the removed bricks are added to the ... Read More

Program to find winner of array removal game in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 23-Oct-2021 07:00:23

138 Views

Suppose Amal and Bimal are playing a game where they have one array A with some numbers.The game rules are as followsBimal will start alwaysIn each turn one player deletes the maximum element from the array and all other elements present at right of the deleted element will also be ... Read More

Program to count number of possible humble matrices in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 23-Oct-2021 06:56:58

102 Views

Suppose we have two values n and m. We have to find number of possible arrangements of humble matrices of order n x m. A matrix is said to be humble whenIt contains each element in range 1 to n x m exactly oncefor any two indices pairs (i1, j1) ... Read More

Program to find out the minimal cost so that the citizens have access to a market in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 23-Oct-2021 06:53:04

245 Views

Suppose, there is n number of cities and m roads connecting the cities. The citizens of the people need markets where they can buy their commodities. Now, there are no markets in the cities, and the roads between the cities are under construction.A two-way road can be built between two ... Read More

Program to find out the minimum value from sum of node values of sub-trees in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 23-Oct-2021 06:46:22

104 Views

Suppose, we have a tree that has all of its nodes numbered as 1 to n. Each of the nodes contains an integer value. Now if we remove an edge from the tree, the difference in the sum of the node values of the two sub-trees has to be minimal. ... Read More

Latin Square in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2021 09:37:38

998 Views

The Latin square is a matrix that has a special pattern. Let's see different examples to examine the pattern.1 2 2 1 1 2 3 3 1 2 2 3 1 1 2 3 4 4 1 2 3 3 4 1 2 2 3 4 1 ... Read More

C++ Program to find out the distinct elements in a given sequence

Arnab Chakraborty

Arnab Chakraborty

Updated on 20-Oct-2021 08:18:48

280 Views

Suppose we are given three integer numbers n, x, y, and z. We have to make a sequence from the given integers where the first item of the sequence is (x modulo 231). Other than the first element, other elements in the sequence ai = (a(i-1) * y + z) ... Read More

C++ Program to find out how many movies an attendee can watch entirely at a Film festival

Arnab Chakraborty

Arnab Chakraborty

Updated on 20-Oct-2021 08:14:19

344 Views

Suppose there is a film festival going on that showcase various movies from various countries. Now, an attendee wants to attend the maximum number of movies that do not overlap with each other and we have to help them to find out how many movies they can attend.There is a ... Read More

Advertisements