LeetCode 592: Fraction Addition and Subtraction
Problem Restatement We are given a string expression representing additions and subtractions of fractions. Each fraction has the form: numerator/denominator A fraction may have a leading + or - . We need to evaluate the whole expression and return the final result as an irreducible fraction string. If the result is an integer, we still return it with denominator 1 . For example: 2 must be returned as: "2/1" The...