C++ Simple 100% Time and Space Solution
\nclass Solution {\npublic:\n    int gcd(int a, int b){\n        if (b == 0)\n            return a;\n        return gcd(b, a % b); \n\n    }\n    string fractio
```\nclass Solution {\npublic:\n    int gcd(int a, int b){\n        if (b == 0)\n            return a;\n        return gcd(b, a % b); \n\n    }\n    string fractionAddition(string exp) {\n        vector<int>num,den;\n        int out=1;\n        int n=exp.length();\n        for(int i=0;i<n;i++){\n            if(exp[i]==\'-\'){\n                out=0;\n                i++;\n            }else if(exp[i]==\'+\'){\n                out=1;\n                i++;\n            }\n            string a="";\n            while(i<n && exp[i]!=\'/\'){\n                a+=exp[i];\n                i++;\n            }\n            // cout << a << "/";\n            if(out==0){\n                num.push_back(-stoi(a));\n            }else{\n                num.push_back(stoi(a));\n            }\n            if(exp[i]==\'/\'){\n                i++;\n            }\n            a="";\n            while(i<n && exp[i]!=\'-\' && exp[i]!=\'+\'){\n                a+=exp[i];\n                i++;\n            }\n            // cout << a << "\\n";\n            den.push_back(stoi(a));\n            i--;\n        }\n        int proden=1;\n        for(int i=0;i<den.size();i++){\n            proden*=den[i];\n        }\n        int sum=0;\n        for(int i=0;i<den.size();i++){\n            int a=proden/den[i];\n            sum+=(num[i]*a);\n        }\n        if(abs(sum)%proden==0){\n            return to_string(sum/proden)+"/1";\n        }\n        int a=gcd(sum,proden);\n        if(proden<0 || sum<0){\n            return "-"+to_string(abs(sum/a))+"/"+to_string(abs(proden/a));\n        }\n        return to_string(sum/a)+"/"+to_string(proden/a);\n    }\n};\n```
['C']