Package org.telluriumsource.misc

Examples of org.telluriumsource.misc.Trie


    }

    @Test
    public void testInsert(){
        String[] dictionary = {"a", "an", "and", "andy", "bo", "body", "bodyguard", "some", "someday", "goodluck", "joke"};
        Trie trie = new Trie();
        String[] ndict = randomize(dictionary);
        trie.buildTree(ndict);
        trie.checkAndIndexLevel();
        trie.printMe();
        Node deepest = trie.getDeepestNode();
        assertNotNull(deepest);
        System.out.println("deepest word: " + deepest.getFullWord() + ", level: " + deepest.getLevel());
       
    }
View Full Code Here

TOP

Related Classes of org.telluriumsource.misc.Trie

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.