function for preorder traversal
static boolean preorder ( Trie node , String arr [ ] ) { if ( node == null ) { return false ; } for ( int i = 0 ; i < MAX_CHAR ; i ++ ) { if ( node . child [ i ] != null ) {