public int minimumLengthEncoding(String[] words) {
        if (words == null || words.length == 0)
            return 0;
        res = 0;
        root = new TrieNode('0');
        Arrays.sort(words, (a, b) -> {
            int d = b.length() - a.length();
            if (d == 0)
                return b.compareTo(a);
            return d;
        });
        Set<String> set = new HashSet<>();
        for (int i = 0; i < words.length; i++) {
            addWord(words[i], set);
        }
        return res;
    }
Why Did you create this class? what does it do?
src/problems/medium/ShortEncodingofWords.java