Start with result (numerator , denominator ).
Parse each fraction from the string (handle and signs).
For each fraction , compute new numerator and new denominator .
After each addition, simplify using GCD.
Parse and compute
Start with result (numerator , denominator ).
Parse each fraction from the string (handle and signs).
For each fraction , compute new numerator and new denominator .
After each addition, simplify using GCD.