0 ms runtime well commented
\n\n# Code\n\nclass Solution {\npublic:\n    string strWithout3a3b(int a, int b) {\n\n        //idea is we count how many continous a\'s & b\'s appended if if b
\n\n# Code\n```\nclass Solution {\npublic:\n    string strWithout3a3b(int a, int b) {\n\n        //idea is we count how many continous a\'s & b\'s appended if if becomes we change next letter to be appended\n        \n        string res="";\n        int la=0,lb=0;\n        while(a>0 || b>0){\n\n            if((a>=b && la<2 )||(b>=a && lb==2)){//we will append a if its greater than b & not creating aaa\n                res+="a";\n                a--;\n                la++;\n                lb=0;\n            }\n            else {\n                res+="b";\n                b--;\n                lb++;\n                la=0;\n            }\n\n        }\n        return res;\n        \n    }\n};\n```
['Greedy', 'C++']