This is a verified interview question from Trilogy. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Sum of Fractions - Trilogy" covers key patterns like Other.
"Your task is to find the sum of two fractions, expressed in the form X/Y and U/V, where X, Y, U, and V are four integers. Compute their sum and reduce it to its lowest indivisible state: A/B. For example: - 2/6+2/6 equals 4/6, which should be reduced to 2/3. - 7/10+13/10 equals 20/10 which should be reduced to 2/1. You are given an array of strings, which contains several expressions in the form "X/Y+U/V". Return a string array, where the ith element is the result for the ith expression in the form "A/B"."
Join thousands of developers practicing for Trilogy.