100 % C++ || Easy Implementation
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    string fractionAddition(string expression) {\n        int num=0,den=1;\n        int i=0,n=expression.size();\n        int sign=1;\n        if(expression[0]==\'-\'){\n            sign=-1;\n            i++;\n        }\n        while(i<n){\n            int numerator=0;\n            while(i<n and isdigit(expression[i]))\n            {\n                numerator=10*(numerator)+(expression[i]-\'0\');\n                i++;\n            }\n            numerator*=sign;\n            i++;\n            int denominator=0;\n            while(i<n and isdigit(expression[i]))\n            {\n                denominator=10*(denominator)+(expression[i]-\'0\');\n                i++;\n            }\n            num=(num*denominator)+(numerator*den);\n            den*=denominator;\n            int g=gcd(abs(num),den);\n            num/=g;\n            den/=g;\n            sign=1;\n            if(expression[i]==\'-\')sign=-1;\n            i++;\n        }\n        return to_string(num) + "/" + to_string(den);\n    }\n};\n```
['C++']