Arnab Chakraborty has Published 4452 Articles

Program to find out the XOR values of specific elements from a generated list in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 20-Oct-2021 08:09:12

109 Views

Suppose we are given a list that contains natural numbers. Now from that list, we remove all the numbers that contain two consecutive 1s in its binary representation and generate another list called Z. Now we are given another list 'input_list' that contains some integer values. We have to find ... Read More

Program to find out the scalar products of vectors generated from an infinite sequence in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 20-Oct-2021 08:08:29

96 Views

Suppose we are given three integer numbers c, m, and n. We have to generate an infinite sequence, where the first value is 0, the second value is c, and from the third value onwards it is equal to ki = (ki-2 + ki-1) mod m. We have to generate ... Read More

Program to find out the sum of the number of divisor of the divisors in Python

Arnab Chakraborty

Arnab Chakraborty

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

174 Views

Suppose we are given two integer numbers m and a. Now n = p1(a + 1) *p2(a + 2) *...*pm(a + m), where pi is the i-th prime number and i > 0. We have to find the value of k, where k = summation of f(x) values of n. ... Read More

Program to find out the value of a given equation in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 20-Oct-2021 07:58:13

864 Views

Suppose we are given five integer numbers a, b, c, d, n. We have to find out ((ab)(cd)) mod n. The output value is an integer number.So, if the input is like a = 2, b = 3, c = 2, d = 4, n = 10, then the output ... Read More

Program to find out the length of the substring where two times the number of zeroes in substring is lesser than or equal to three times the number of ones in the substring in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 20-Oct-2021 07:54:31

162 Views

Suppose we are given a string and an integer k. The string is repeated k times and made to another string. Our task is to find the length of the substring in the new string where 2 * (number of zeroes in substring) 0:          continue ... Read More

Program to find out the value of a power of 2 in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 20-Oct-2021 07:47:48

306 Views

Suppose we are given two integer numbers p and q. We have to find out the value of 22^p mod q. The output has to be an integer.So, if the input is like p = 5, q = 6, then the output will be 4To solve this, we will follow ... Read More

Program to find out the number of special numbers in a given range in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 20-Oct-2021 07:46:48

2K+ Views

Suppose we are given a range of integer numbers and are asked to find out the special numbers in the range. A special number is a number that is a positive integer having only 1 digit in its decimal representation. A number that has more than 1 digit in its ... Read More

Program to find out the number of consecutive elements in a matrix whose gcd is greater than 1 in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 20-Oct-2021 07:43:46

158 Views

Suppose we are given a matrix that contains n rows and m columns. We have to find out the largest number of consecutive elements in the matrix where the gcd of the elements is greater than 1. The consecutive elements can either lie horizontally or vertically in the matrix.So, if ... Read More

Program to find length of longest consecutive sublist with unique elements in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2021 13:43:10

242 Views

Suppose we have a list of numbers called nums, where all elements are unique. We have to find the length of the longest sublist that contains consecutive elements.So, if the input is like nums = [3, 6, 7, 5, 4, 9], then the output will be 5, because the sublist ... Read More

Program to express a positive integer number in words in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Oct-2021 12:54:22

230 Views

Suppose we are given a positive integer number. We have to spell the number in words; like if a number "56" is given as input the output will be "Fifty-Six". The range of conversion is up to a billion.So, if the input is like input = 5678, then the output ... Read More

Advertisements