heapster-saw/examples/linked_list.c
/* Serach for a specific value in a list */
Serach for a specific value in a list
Serach for a specific value in a list
list64_t *find_elem (int64_t x, list64_t *l) {
  if (l == NULL) {
    return NULL;
  } else if (l->data == x) {
    return l;
  } else {
    return find_elem (x, l->next);
  }
}
list64_t * find_elem ( int64_t x , list64_t * l ) { if ( l == NULL ) { return NULL ; } else if ( l -> data == x ) { return l ; } else { return find_elem ( x , l -> next ) ; } }
Serach for a specific value in a list
Serach for a specific value in a list