Arnab Chakraborty has Published 4452 Articles

C++ Program to find opponent in a circular standing of persons

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 07:54:41

87 Views

Suppose we have three numbers a, b and c. There are k numbers of students (k is even) standing on a circle, they are numbered from 1 to k in clockwise order. We do not know the value of k. Each person is watching through the center of the circle ... Read More

C++ Program to get length of longest subsequence in n times copied sequence

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 07:50:45

130 Views

Suppose we have an array A with n elements. We can make another array consisting of n copies of the old array, added elements back-to-back. We have to find the the length of the new array's longest increasing subsequence? We know that a sequence p is a subsequence of an ... Read More

C++ Program to count ordinary numbers in range 1 to n

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 07:47:40

544 Views

Suppose we have a number n. A number is a positive integer n, and that said to be an ordinary number if in the decimal notation all its digits are the same. We have to count the number of ordinary numbers in range 1 to n.Problem CategoryVarious problems in programming ... Read More

C++ Program to find permutation from merged permutations

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Apr-2022 07:44:17

177 Views

Suppose we have an array A with 2n number of elements. We know a permutation of first n natural numbers is a set of numbers where 1 to n are stored and they are ordered in an arbitrary order. in the array A, there are two permutations of size n ... Read More

C++ Program to check given candies can be split with equal weights or not

Arnab Chakraborty

Arnab Chakraborty

Updated on 07-Apr-2022 11:24:17

213 Views

Suppose we have an array A with n elements. Amal and Bimal received n candies from their parents. Each candy weighs either 1 gram or 2 grams. They want to divide all candies among themselves fairly so that their total candies weight is same. We have to check whether we ... Read More

C++ Program to find minimum difference between strongest and weakest

Arnab Chakraborty

Arnab Chakraborty

Updated on 07-Apr-2022 11:21:24

112 Views

Suppose we have an array A with n elements. There are n athletes in a game. They are numbered from 1 to n and arranged in left to right order. The strength of each athlete i is A[i]. We want to split all athletes into two teams. Each team must ... Read More

C++ Program to count operations to make all gifts counts same

Arnab Chakraborty

Arnab Chakraborty

Updated on 07-Apr-2022 11:17:37

1K+ Views

Suppose we have two arrays A and B of size n each. There are n gifts and we want to give them to some children. The ith gift has A[i] candies and B[i] oranges. During one move, we can choose some gift and do one of the following operations −Take ... Read More

C++ Program to find winner and final price in a second price auction event

Arnab Chakraborty

Arnab Chakraborty

Updated on 07-Apr-2022 11:14:09

225 Views

Suppose we have an array A with n elements. There is a special type of an auction, which is called the second-price auction. In a regular auction, n bidders place a bid which is price a bidder ready to pay. The auction ends, when each bidder secretly informs the organizer ... Read More

C++ Program to find array of candy distribution to m friends

Arnab Chakraborty

Arnab Chakraborty

Updated on 07-Apr-2022 11:11:37

218 Views

Suppose we have two numbers n and m. Amal has n candies and m friends. He wants to make a present with candies to each friend. Amal is planning to present all candies and he wants to do this in the most equal manner. He wants to choose such A[i], ... Read More

C++ program to distribution of apples for two mice

Arnab Chakraborty

Arnab Chakraborty

Updated on 07-Apr-2022 11:08:41

333 Views

Suppose we have a number n and two arrays A and B of different sizes. There are two mice: m1 and m2. We put n apples in front of them. We know which apples m1 likes. Similarly, we also know which apples m2 likes. We do not want any conflict ... Read More

Advertisements