very easy and clear code (c++) faster than 100 percent
\tclass Solution {\n\tpublic:\n\t\tstring baseNeg2(int n) {\n\t\t\tif(n==0)\n\t\t\t{\n\t\t\t\treturn "0";\n\t\t\t}\n\t\t\tstring s="";\n\t\t\tint neg=-2;\n\t\t\
\tclass Solution {\n\tpublic:\n\t\tstring baseNeg2(int n) {\n\t\t\tif(n==0)\n\t\t\t{\n\t\t\t\treturn "0";\n\t\t\t}\n\t\t\tstring s="";\n\t\t\tint neg=-2;\n\t\t\twhile(n!=0)\n\t\t\t{\n\t\t\t\tint rem=n%neg;\n\t\t\t\tn=n/neg;\n\t\t\t\tif(rem<0)\n\t\t\t\t{\n\t\t\t\t\trem+=2;\n\t\t\t\t\tn+=1;\n\t\t\t\t}\n\t\t\t\ts+=to_string(rem);\n\t\t\t}\n\t\t\treverse(s.begin(),s.end());\n\t\t\treturn s;\n\n\t\t}\n\t};
[]