int treedepth(binarytree *tree){
if(tree==NULL){
return 0;
}
int left = treedepth(tree->left);
int right = treedepth(tree->right);
return (left> right) ? left++: right++;
}
int treedepth(binarytree *tree){
if(tree==NULL){
return 0;
}
int left = treedepth(tree->left);
int right = treedepth(tree->right);
return (left> right) ? left++: right++;
}
一、Trie的介紹: 1、主要應用場景:搜索引擎的自動補全功能:Trie樹+詞頻(概率)權重因子 IP路由:最長前綴匹配,Trie路由算法