@@ -0,0 +1,1319 @@
+package string;%0A%0A/**%0A * key value%0A * shell  2%0A * short  3%0A */%0Apublic class WordTree%3CValue%3E %7B%0A%0A    //%E9%80%82%E9%85%8D256%E4%B8%AA%E5%AD%97%E7%AC%A6%0A    public static final int R = 256;%0A%0A    private Node root;%0A%0A    public static class Node %7B%0A        Object value;%0A        Node%5B%5D next = new Node%5BR%5D;%0A    %7D%0A%0A    public Value get(String key) %7B%0A        Node node = get(root, key, 0);%0A        if (node == null) return null;%0A%0A        return (Value) node.value;%0A    %7D%0A%0A    public Node get(Node node, String key, int index) %7B%0A%0A        if (node == null) return null;%0A%0A        if (index == key.length()) return node;%0A%0A        char c = key.charAt(index);%0A        return get(node.next%5Bc%5D, key, index + 1);%0A%0A    %7D%0A%0A    public void put(String key, Value value) %7B%0A        //%E5%8F%96%E7%AC%AC%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%E8%BF%9B%E8%A1%8C%E6%AF%94%E8%BE%83%0A        root = put(root, key, value, 0);%0A    %7D%0A%0A    /**%0A     * %E5%AF%B9%E6%AF%8F%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%9A%84%E5%AD%97%E7%AC%A6%E5%8F%96%E5%87%BA%EF%BC%8C%E8%BF%9B%E8%A1%8C%E9%80%92%E5%BD%92%E6%9F%A5%E8%AF%A2%0A     *%0A     * @param node%0A     * @param key%0A     * @param value%0A     * @param index%0A     * @return%0A     */%0A    public Node put(Node node, String key, Value value, int index) %7B%0A%0A        //%E9%80%92%E5%BD%92%E5%88%B0%E6%9C%80%E5%90%8E%EF%BC%8C%E5%AD%97%E7%AC%A6%E4%B8%B2%0A        if (node == null) node = new Node();%0A        if (index == key.length()) %7B%0A            node.value = value;%0A            return node;%0A        %7D%0A%0A        char c = key.charAt(index);%0A        node.next%5Bc%5D = put(node.next%5Bc%5D, key, value, index + 1);//%E6%9C%AC%E5%AD%97%E7%AC%A6%E4%B8%AD%E6%9F%A5%E6%89%BE%E5%88%B0%E4%BA%86%EF%BC%8C%E7%BB%A7%E7%BB%AD%E6%9F%A5%E6%89%BEkey%E4%B8%AD%E4%B8%8B%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%EF%BC%8C%E9%80%92%E5%BD%92%0A%0A        return node;%0A%0A    %7D%0A%0A%7D%0A

add word tree logic