Arnab Chakraborty has Published 4452 Articles

Python Program to find the number of operations to pack several metal bars in a container

Arnab Chakraborty

Arnab Chakraborty

Updated on 18-May-2021 06:00:16

145 Views

Suppose, we are given the tasks to transport several metal bars of different sizes. But the transportation container is short in length, it can contain bars of length 1 only. We are provided n number of bars, and their lengths are given to us in a list. So, to fit ... Read More

Python Program to find out the price of a product after a number of days

Arnab Chakraborty

Arnab Chakraborty

Updated on 18-May-2021 05:56:14

1K+ Views

Suppose, a person wants to buy a product of price x. But each passing day, the price of the product increases x times the price of the previous day. We have to find out the price of the product after y days since the person has made up his mind ... Read More

Python Program to find out the number of matches in an array containing pairs of (base, number)

Arnab Chakraborty

Arnab Chakraborty

Updated on 18-May-2021 05:52:17

307 Views

Suppose, we are given several different pairs in the format (x, y). Here the x signifies the base of a number and y signifies the number itself. In the list there are pairs that mean the same. We have to check the number of matches in the given number pairs. ... Read More

Python Program to find out the size of the bus that can contain all the friends in the group

Arnab Chakraborty

Arnab Chakraborty

Updated on 18-May-2021 05:47:07

257 Views

Suppose, there are n number of student groups waiting to get back from their college to their home via the college bus. In each student group, there are m number of students. The student groups want to travel by bus without getting separated. They board the bus if and only ... Read More

Program to find wealth of richest customer in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-May-2021 13:16:03

900 Views

Suppose we have a matrix of order m x n called accounts where accounts[i][j] is the amount of money of ith customer present in jth bank. We have to find the wealth that the richest customer has. A customer is richest when he/she has maximum amount considering all banks.So, if ... Read More

Program to find maximum k-repeating substring from sequence in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-May-2021 13:15:25

930 Views

Suppose we have a sequence of characters called s, we say a string w is k-repeating string if w is concatenated k times is a substring of sequence. The w's maximum k-repeating value will be the highest value k where w is k-repeating in sequence. And if w is not ... Read More

Program to check whether two string arrays are equivalent or not in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-May-2021 13:14:15

713 Views

Suppose we have two string type arrays word1 and word2, we have to check whether the two arrays represent the same string or not. We can say a string can be represented by an array if the elements in that array are concatenated in order forms the string.So, if the ... Read More

Program to decrypt code to defuse the bomb in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-May-2021 13:13:20

415 Views

Suppose there is a bomb that you are going to defuse, and your time is running out! You have a a circular array code of length of n and have a key k. Now to decrypt the code, you must replace every number. All the numbers are replaced simultaneously. There ... Read More

Program to find maximum in generated array in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-May-2021 13:11:48

284 Views

Suppose we have a number n. We have to generate an array A of length n + 1 in the following way −A[0] = 0A[1] = 1A[2 * i] = A[i] if 2

Program to check we can form array from pieces or not in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-May-2021 13:09:09

90 Views

Suppose we have an array nums where all elements are unique and have another array with different smaller arrays called pieces. We have to check whether we can get the main array nums by concatenating the arrays in pieces in any order or not. But we are not allowed to ... Read More

Advertisements