Brute force "solution" - Time Limit Exceeded
In case this helps you understand, here is a brute force cubic time O(n^3) solution that will pass the first test cases, but times out on submission when run wi
In case this helps you understand, here is a brute force cubic time O(n^3) solution that will pass the first test cases, but times out on submission when run with very large inputs.\n\n```\nclass Solution {\n    public int uniqueLetterString(String s) {\n        int result = 0;\n        for(int i = 0; i < s.length(); i++) {\n            for(int j = i; j < s.length(); j++) {\n                HashMap<Character, Integer> map = new HashMap<>();\n                for(int k = i; k <= j; k++) {\n                    char c = s.charAt(k);\n                    int count = map.getOrDefault(c, 0);\n                    map.put(c, count+1);\n                }\n                for(Map.Entry<Character, Integer> entry : map.entrySet()) {\n                    if(entry.getValue() == 1) {\n                        System.out.println(entry.getKey());\n                        ++result;\n                    }\n                }\n            }\n        }\n        return result;\n    }\n}\n```
['Java']