template<typename T>
Node* find(Node* root,T Key){
    if(root == NULL)
        return NULL;
    if(root.val >= key){
        return find(root.left, key);
    }else{
        Node * tmp = find(root.right, key);
        if(tmp == NULL){
            return root;
        }else{
            return tmp;
        }
    }
}

kamushin233
439 声望5 粉丝

[链接]