-
-
Save parzibyte/d89d62a8530612d6f891e4d77f71a0eb 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
void agregar(struct nodoCadena *nodo, char *cadena) | |
{ | |
if (strcmp(cadena, nodo->cadena) > 0) | |
{ | |
if (nodo->derecha == NULL) | |
{ | |
nodo->derecha = nuevoNodo(cadena); | |
} | |
else | |
{ | |
agregar(nodo->derecha, cadena); | |
} | |
} | |
else | |
{ | |
if (nodo->izquierda == NULL) | |
{ | |
nodo->izquierda = nuevoNodo(cadena); | |
} | |
else | |
{ | |
agregar(nodo->izquierda, cadena); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment