Company: Trilogy
Difficulty: medium
CodeWriting: Fraction Addition 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. You are given an array of strings, which contains several expressions in the form \"X/Y+U/V\". Return a string array, where the i th element is the result for the i th expression in the form \"A/B\". Examples 2/6+2/6 equals 4/6, which should be reduced to 2/3 7/10+11/10 equals 20/10 which should be reduced to 2/1 Sample Input/Output: fractions = [\"2/6+2/6\", \"7/10+11/10\"] solution(fractions) = [\"2/3\", \"2/1\"] Input [input] array.string fractions An array of strings, where each string contains an expression that represents the sum of two fractions, given in the form \"X/Y+U/V\". Guaranteed Constraints 1 ≤ fractions.length ≤ 500 fractions[i] has the form \"X/Y+U/V\" where X, Y, U, V are integers 1 ≤ X, Y, U, V ≤ 2000 Output [output] array.string An array of strin