Given two strings S and T representing non-negative rational numbers, the task is to check if the values of S and T are equal or… Read More

# Tag Archives: Fraction

Given two arrays arr1[] and arr2[] of length N which contains Numerator and Denominator of N fractions respectively, the task is to count the number… Read More

Given an array arr[], the task is to count the pairs in the array such that arr[i]/arr[j] is a Pandigital Fraction. A fraction N/D is… Read More

Pre-requisite: Fractional Knapsack Problem Given two arrays weight[] and profit[] the weights and profit of N items, we need to put these items in a… Read More

Given a decimal number as N, the task is to convert N into an equivalent irreducible fraction. An irreducible fraction is a fraction in which… Read More

Given an integer N, the task is to print all proper fractions such that the denominator is less than or equal to N. Proper Fractions:… Read More

Given two arrays num[] and den[] which denotes the numerator and denominator respectively, the task is to find the count of the unique fractions.Examples: Input:… Read More

Given a fraction N/D, the task is to split this fraction into N parts such that their sum is equal to the fraction N/D, i.e.,… Read More

Given three integers P, Q and N where P < Q, the task is to compute the fraction value of P / Q and find… Read More

Given an integer N, the task is to print the first N terms of the series in their fraction form i.e. 1/4, 1/2, 3/4, 1,… Read More

Given n fractions as two arrays Num and Den. The task is to find out the L.C.M of the fractions. Examples: Input: num[] = {1,… Read More

Given two integers representing the Numerator and Denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the… Read More

Given the Numerator and Denominator of N fractions. The task is to find the product of N fraction and output the answer in reduced form.… Read More

According to Midy’s theorem, if the period of a repeating decimal for , where p is prime and is a reduced fraction, has an even number of… Read More