node* search(node ** tree, int val) {
if(!(*tree)) {
return NULL;
}
if(val == (*tree)->data) {
return *tree;
} else if(val < (*tree)->data) {
search(&((*tree)->left), val);
} else if(val > (*tree)->data){
search(&((*tree)->right), val);
}
}
Code Example |
---|
:: |
:: |
:: |
:: |
C :: sqlserver insert with set identity |
C :: |
:: |
:: |
C :: |
C :: |
C :: stack push |
:: |
:: |
C :: |
:: |
:: |
:: square in c |
C :: |
C :: |
C :: |
:: what is the last character of a string in c |
:: *= in c |
:: |
C :: |
C :: |
:: |
:: |
:: |
C :: uri/beecrowd problem no - 1133 solution in C |
C :: |