java 11 ms, faster than 92.89%
If you like it pls upvote\n\n\n    public String removeDuplicates(String s) {\n        StringBuilder stb = new StringBuilder();\n        int count = 0;\n\n     
If you like it pls upvote\n```\n\n    public String removeDuplicates(String s) {\n        StringBuilder stb = new StringBuilder();\n        int count = 0;\n\n        for (int i = 0; i < s.length(); i++) {\n            if (stb.length() == 0) {\n                stb.append(s.charAt(i));\n            } else if (s.charAt(i) == stb.charAt(count)) {\n                stb.deleteCharAt(count);\n                if (count!=0) count--;\n            } else {\n                stb.append(s.charAt(i));\n                count++;\n            }\n        }\n        return stb.toString();\n    }\n\n```
['Java']