[Home]
[Contents]
[Chapter]
[Previous Algorithm]
[Next Algorithm]


Digital tree (trie) search


search( key, t ) typekey key; trie t; { int depth; for( depth=1; t!=NULL && !IsData(t); depth++ ) t = t->p[ charac(depth,key) ]; if( t != NULL && key == t->k ) found( t ); else notfound( key ); }

C source (344.srch.c)



© Addison-Wesley Publishing Co. Inc.