Arnab Chakraborty

Arnab Chakraborty

3,768 Articles Published

Articles by Arnab Chakraborty

Page 179 of 377

Biggest Reuleaux Triangle within a Square which is inscribed within a Right angle Triangle?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 164 Views

Here we will see how to find the area of the biggest Reuleaux triangle inscribed within a square, where that square is inscribed inside a right angled triangle. A Reuleaux triangle is a curved triangle with constant width formed by the intersection of three circles. b (base) l a h (hypotenuse) The side of the square inscribed in a right angled triangle with height ...

Read More

Biggest Reuleaux Triangle inscribed within a square which is inscribed within an ellipse?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 169 Views

Here we will see how to calculate the area of the biggest Reuleaux triangle inscribed within a square, where that square is inscribed inside an ellipse. We know that the major axis length is 2a, and the minor axis length is 2b. The side of the square is 'x', and the height of the Reuleaux triangle is h. 2a (major axis) 2b (minor axis) ...

Read More

Biggest Reuleaux Triangle inscribed within a square which is inscribed within a hexagon?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 149 Views

Here we will see the area of biggest Reuleaux triangle inscribed within a square which is inscribed in a regular hexagon. Suppose 'a' is the side of the hexagon. The side of the square is x and the height of the Reuleaux triangle is h. Hexagon (side a) Square (side x) Reuleaux Triangle (height h) ...

Read More

Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 217 Views

Here we will see the area of biggest Reuleaux triangle inscribed within a square which is inscribed in an equilateral triangle. A Reuleaux triangle is a shape formed by the intersection of three circles of equal radius, creating a curved triangle with constant width. Equilateral Triangle (side = a) Square ...

Read More

Biggest Reuleaux Triangle inscirbed within a square inscribed in a semicircle?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 169 Views

Here we will see how to calculate the area of the biggest Reuleaux triangle inscribed within a square which is inscribed in a semicircle. Given the radius of the semicircle as R, the side of the square as 'a', and the height of the Reuleaux triangle as h. Semicircle (radius R) Square (side a) Reuleaux Triangle Center ...

Read More

Array with GCD of any of its subset belongs to the given array?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 262 Views

In this problem, we need to generate an array such that the GCD of any subset of that array belongs to the given set of elements. The constraint is that the generated array should not be more than thrice the length of the given set. Syntax int gcd(int a, int b); int getGCDofArray(int arr[], int n); void generateArray(int arr[], int n); Algorithm The algorithm works as follows − Calculate the GCD of the entire given array Check if this GCD equals the minimum element of the array If yes, insert the GCD ...

Read More

Array sum after dividing numbers from previous?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 160 Views

Here we will see one interesting problem. We will take one array, then find the sum by taking each element after dividing it by the previous elements. Let us consider an array is {5, 6, 7, 2, 1, 4}. Then the result will be 5 + (6 / 5) + (7 / 6) + (2 / 7) + (1 / 2) + (4 / 1) = 12.15238. Syntax float divSum(int arr[], int n); Algorithm divSum(arr, n) begin sum := arr[0] for i := 1 to ...

Read More

Array elements with prime frequencies?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 511 Views

In this problem, we need to count how many distinct elements in an array appear a prime number of times. For example, if the array is {1, 2, 2, 0, 1, 5, 2, 5, 0, 0, 1, 1}, then 1 appears 4 times (not prime), 2 appears 3 times (prime), 0 appears 3 times (prime), and 5 appears 2 times (prime). So there are three elements {2, 0, 5} with prime frequencies, giving us a count of 3. Syntax int countPrimeOccurrence(int arr[], int n); bool isPrime(int n); Algorithm countPrimeOccurrence(arr, n) Begin ...

Read More

Array elements that appear more than once?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 391 Views

In C programming, finding array elements that appear more than once is a common problem. Given an array, we need to identify which elements have a frequency greater than 1. For example, in the array {1, 5, 2, 5, 3, 1, 5, 2, 7}, elements 1, 2, and 5 appear multiple times, so they should be included in our result. Syntax void findDuplicates(int arr[], int n); Algorithm Begin Create frequency array to count occurrences For each element in array: Increment its ...

Read More

Array element with minimum sum of absolute differences?

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 454 Views

In C programming, finding the array element with minimum sum of absolute differences is a classic optimization problem. Given an array of N elements, we need to find a value x that minimizes the sum |a[0] - x| + |a[1] - x| + ... + |a[n-1] - x|. For example, with array {1, 3, 9, 6, 3}, the optimal x is 3, giving us a sum of |1 - 3| + |3 - 3| + |9 - 3| + |6 - 3| + |3 - 3| = 11. The key insight is that the median of the array ...

Read More
Showing 1781–1790 of 3,768 articles
« Prev 1 177 178 179 180 181 377 Next »
Advertisements