-
-
Save parzibyte/00f118d50696d17d9b0edd4429fc5fbe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct nodoCadena *buscar(struct nodoCadena *nodo, char *cadena) | |
{ | |
if (nodo == NULL) | |
{ | |
return NULL; | |
} | |
if (strcmp(cadena, nodo->cadena) == 0) | |
{ | |
return nodo; | |
} | |
else if (strcmp(cadena, nodo->cadena) > 0) | |
{ | |
return buscar(nodo->derecha, cadena); | |
} | |
else | |
{ | |
return buscar(nodo->izquierda, cadena); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment