Arnab Chakraborty has Published 4293 Articles

Find the product of last N nodes of the given Linked List in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 04-Nov-2019 09:59:11

152 Views

Consider we have few elements in a linked list. We have to find the multiplication result of last n number of elements. The value of n is also given. So if the list is like [5, 7, 3, 5, 6, 9], and n = 3, then result will be 5 ... Read More

Find the product of first k nodes of the given Linked List in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 04-Nov-2019 08:17:25

106 Views

Consider we have few elements in a linked list. We have to find the multiplication result of first k number of elements. The value of k is also given. So if the list is like [5, 7, 3, 5, 6, 9], and k = 3, then result will be 5 ... Read More

Find the perimeter of a cylinder in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 04-Nov-2019 08:07:19

171 Views

Suppose we have the diameter and the height of the cylinder, we have to find the perimeter of the cylinder. As the perimeter is the outline of two dimensional object, then we cannot find the perimeter of one three dimensional object directly. We can make a cross section of the ... Read More

Find the other-end coordinates of diameter in a circler in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 04-Nov-2019 08:03:14

94 Views

Suppose we have the center coordinate and one coordinate point on the perimeter of the circle. We have to find the another point on the perimeter. Consider the center points are (p, q), and one given point is (a, b). We have to find the point (x, y). As we ... Read More

Find the Number which contain the digit d in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 04-Nov-2019 08:01:20

159 Views

Consider we have a digit d, and the upper limit n. we have to find all numbers that contains d in range 0 to n. So if n = 20, and digit is 3, then the numbers will be [3, 13].To solve this problem, we will take every number as ... Read More

Find the Next perfect square greater than a given number in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 04-Nov-2019 07:55:45

520 Views

Suppose we have a number n. our task is to find next perfect square number of n. So if the number n = 1000, then the next perfect square number is 1024 = 322.To solve this, we have get the square root of the given number n, then take the ... Read More

Find the length of each string element in the Numpy array in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 04-Nov-2019 07:52:59

152 Views

Here we will see how to get the length of each string element in the Numpy Array. Numpy is a library for Numeric Python, and it has very powerful array class. Using this we can store data in an array like structure. To get the length we can follow two ... Read More

Find sum of factorials in an array in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 04-Nov-2019 07:43:09

240 Views

Consider we have an array A, which is sorted. It has all elements appears twice, but one element is present for only one time. We have to find that element. If the array is [1, 1, 3, 3, 4, 4, 5, 6, 6, 7, 7, 9, 9], so the single ... Read More

Find numbers a and b that satisfy the given condition in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 01-Nov-2019 10:35:58

547 Views

Consider we have an integer n. Our task is to find two numbers a and b, where these three conditions will be satisfied.a mod b = 0a * b > na / b < nIf no pair is found, print -1.For an example, if the number n = 10, then ... Read More

Find N digits number which is divisible by D in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 01-Nov-2019 10:33:46

169 Views

Suppose we have two numbers N and D. We have to find N digit number, that is divisible by D. If N is 3, and D is 5, then the number can be 500. This can be solved easily. If D is 10 and N is 1, then it will ... Read More

Advertisements