Search
 
SCRIPT & CODE EXAMPLE
 

C

binary tree in c search

 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);
  }
 }
Comment

PREVIOUS NEXT
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 ::  
ADD CONTENT
Topic
Content
Source link
Name
5+5 =