[JAVA] easy solution without STACK
\n\n# Code\n\nclass Solution {\n    public boolean backspaceCompare(String s, String t) {\n       return getString(s).equals(getString(t)); \n    }\n    public 
\n\n# Code\n```\nclass Solution {\n    public boolean backspaceCompare(String s, String t) {\n       return getString(s).equals(getString(t)); \n    }\n    public String getString(String str) {\n        int n = str.length();\n        int count = 0;\n        String result = "";\n        for(int i = n - 1; i >= 0; i --) {\n            char ch = str.charAt(i);\n            if(ch == \'#\')\n            count ++;\n            else {\n            if(count > 0) \n            count --;\n            else\n            result += ch;\n            }\n        }\n         return result;\n    }\n}\n```\n# PLEASE UPVOTE IF IT WAS HELPFULL
['Java']