Arnab Chakraborty has Published 4293 Articles

Area of a leaf inside a square?

Arnab Chakraborty

Arnab Chakraborty

Updated on 01-Aug-2019 07:26:47

1K+ Views

Here we will see how to get the area of a leaf-like below, which is present inside the square ABCD. Each side of the square is of length ‘a’.The leaf has two equal parts. Area of each part is said p, now −And the area of the full leaf is ... Read More

Area of a circle inscribed in a rectangle which is inscribed in a semicircle?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 13:38:21

162 Views

Let us consider one semicircle is given. Its radius is R. One rectangle of length l and breadth b is inscribed in that semi-circle. Now one circle with radius r is inscribed in the rectangle. We have to find the area of the inner circle.As we know biggest rectangle that ... Read More

Arc length from given Angle?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 13:33:53

176 Views

Here we will see how to get the arc length from the given angle. One circle is given. The radius of the circle is given. Our task is to get the arc length using the radius and the angle. The angle is in degree.Here r and x is given. We ... Read More

An efficient way to check whether n-th Fibonacci number is multiple of 10?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 13:20:58

251 Views

Here we will see one efficient way to check whether the nth Fibonacci term is multiple of 10 or not. Suppose the Fibonacci terms are {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987}. So here 15th (Counting from 0) Fibonacci term is ... Read More

Amazing stuff with system() in C / C++?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 13:18:06

871 Views

Here we will see some amazing results by using the system() function in C or C++. The system function is present in Windows, Linux and MAC operating systems. This function is used to execute the system commands that can be written in Command line.Here we will see two usages if ... Read More

All possible strings of any length that can be formed from a given string?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 13:14:53

744 Views

In this section we will see how to generate all possible strings of any length, this will take each combination of characters to make string. For example, if the string is ABC, then it will generate − {A, B, C, AB, BA, BC, CB, CA, AC, ABC, ACB, BAC, BCA, ... Read More

All possible numbers of N digits and base B without leading zeros?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 13:11:26

231 Views

Here we will see one problem, We have N and base B. Our task is to count all N digit numbers of base B without any leading 0s. So if N is 2 and B is 2 there will be four numbers 00, 01, 10, 11. So only two of ... Read More

All possible co-prime distinct element pairs within a range [L, R]?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 13:08:45

279 Views

Here we will see how to count number of co-prime pairs from the range, where a number will not appear more than a single pair.Before discussing the logic, let us see what are the co-prime numbers? The co-prime numbers are those numbers which has only one positive integer divisor, that ... Read More

All possible binary numbers of length n with equal sum in both halves?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 13:06:08

254 Views

Here we will see all possible binary numbers of n bit (n is given by the user) where the sum of each half is same. For example, if the number is 10001 here 10 and 01 are same because their sum is same, and they are in the different halves. ... Read More

All palindrome numbers in a list?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 13:00:48

326 Views

Here we will see one simple problem. We have to find all numbers that are palindrome in nature in a given list. The approach is simple, take each number from list and check it is palindrome or not, and print the number.AlgorithmgetAllPalindrome(arr, n)Begin    for each element e in arr, ... Read More

Advertisements