Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 6, 2019 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/2262e459a6ea83d75d383fb226e8e2a7 to your computer and use it in GitHub Desktop.
Save parzibyte/2262e459a6ea83d75d383fb226e8e2a7 to your computer and use it in GitHub Desktop.
struct Nodo *nuevoNodo(int dato) {
// Solicitar memoria
size_t tamanioNodo = sizeof(struct Nodo);
struct Nodo *nodo = (struct Nodo *) malloc(tamanioNodo);
// Asignar el dato e iniciar hojas
nodo->dato = dato;
nodo->izquierda = nodo->derecha = NULL;
return nodo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment