algorithm,data-structures,tree,tree-traversal,ternary-search-tree

You can think of a ternary search tree as a hierarchy of different binary search trees - the black lines connect together nodes in the same BST, and the dotted lines link different BSTs together. You can list off all the words in a TST by doing a modified inorder...

else { searchTotal_r(lf->left,total); searchTotal_r(lf->center,total); searchTotal_r(lf->right,total); } Change to: else { return searchTotal_r(lf->left,total) || searchTotal_r(lf->center,total) || searchTotal_r(lf->right,total); } The way you currently have it, the recursive searches don't actually matter because you always return 0 even if you find something....

algorithm,tree,ternary-search-tree

A1: The equals pointer marks the continuation of the current prefix. Thus C -> CA -> CAT -> CATS but not C -> CB[UGS]. A2: This would be a ternary search tree for the given set of expressions ( termination flags and leaf node expansion omitted): C | +--------------------+---------------------+ |...