🔥100%% Explanations No One Will Give You🎓🧠Very Detailed Approach🎯🔥
# Code\ncpp []\nclass Solution {\npublic:\n    string fractionAddition(string expression) {\n        int num = 0;\n        int den = 1;\n        int i = 0;\n   
# ***# Code***\n```cpp []\nclass Solution {\npublic:\n    string fractionAddition(string expression) {\n        int num = 0;\n        int den = 1;\n        int i = 0;\n        int n = expression.size();\n        while (i < n) {\n            int currentnum = 0;\n            int currentden = 0;\n            bool negative = (expression[i] == \'-\');\n            while (i < n && (expression[i] == \'-\' || expression[i] == \'+\')) {\n                i++;\n            }\n            while (i < n && isdigit(expression[i])) {\n                int a = expression[i] - \'0\';\n                currentnum = (currentnum * 10) + a;\n                i++;\n            }\n            i++;\n            while (i < n && isdigit(expression[i])) {\n                int a = expression[i] - \'0\';\n                currentden = (currentden * 10) + a;\n                i++;\n            }\n            if (negative == true) {\n                currentnum *= -1;\n            }\n            num = num * currentden + den * currentnum;\n            den = den * currentden;\n        }\n        int Gcd = abs(__gcd(num, den));\n        num /= Gcd;\n        den /= Gcd;\n        return to_string(num) + "/" + to_string(den);\n    }\n};\n```
['Math', 'String', 'PHP', 'Simulation', 'Python', 'C++', 'Java', 'JavaScript']