Arnab Chakraborty has Published 4293 Articles

Program to check whether given matrix is Toeplitz Matrix or not in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:41:11

728 Views

Suppose we have a matrix M, we have to check whether it is a Toeplitz matrix or not. As we know a matrix is said to be Toeplitz when every diagonal descending from left to right has the same value.So, if the input is like726372537then the output will be True.To ... Read More

Program to find the product of three elements when all are unique in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:39:37

603 Views

Suppose we have three numbers, x, y, and z, we have to find their product, but if any two numbers are equal, they do not count.So, if the input is like x = 5, y = 4, z = 2, then the output will be 40, as all three numbers ... Read More

Program to find final text in an editor by performing typing and backspacing in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:37:05

167 Views

Suppose we have a string s that represents characters that typed into an editor, the symbol "

Program to find number of tasks can be finished with given conditions in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:35:06

357 Views

Suppose we have a list of tasks and another list of people. The tasks[i] determines the amount of strength required to perform the ith task. And the people[i] determines the amount of strength the ith person has. Finally, we have to find the number of tasks that can be finished ... Read More

Program to find minimum number of operations required to make one number to another in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:31:30

407 Views

Suppose we have a number start and another number end (start < end), we have to find the minimum number of operations required to convert start to end using these operations −Increment by 1Multiply by 2So, if the input is like start = 5, end = 11, then the output ... Read More

Program to find any two numbers in a list that sums up to k in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:27:12

837 Views

Suppose we have a list of numbers called nums and we have another number k, we have to check whether any two numbers present in the list add up to k or now. Same elements must not be used twice. And numbers can be negative or 0.So, if the input ... Read More

Program to find the sum of all digits of given number in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:26:03

1K+ Views

Suppose we have a number num, we have to find the sum of its digits. We have to solve it without using strings.So, if the input is like num = 512, then the output will be 8, as 8 = 5 + 1 + 2.tput will be 8, as 8 ... Read More

Program to find minimum number of operations required to make one string substring of other in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:24:52

684 Views

Suppose we have two strings s and t, we have to find the minimum amount of operations required for s to make t a substring of s. Now, in each operation, we can choose any position in s and change the character at that position to any other character.So, if ... Read More

Program to find nth sequence after following the given string sequence rules in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:22:38

314 Views

Suppose we have two strings s, t and another positive number n is also given, we have to find return the nth term of the sequence A where −A[0] = sA[1] = tA[n] = A[n - 1] + A[n - 2] when n is even, otherwise A[n] = A[n - ... Read More

Program to check whether one string can be 1-to-1 mapped into another string in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Oct-2020 07:16:56

496 Views

Suppose we have two lowercase strings s, and t we have to check whether we can create one 1-to-1 mapping for each letter in s to another letter (may be the same letter) such that s can be mapped to t. (The ordering of characters will not be changed).So, if ... Read More

Advertisements