Created
December 29, 2018 13:49
-
-
Save lesimoes/4c1aea899e486f2917cf2b563719c140 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define TAM 10 | |
struct arvore { | |
char info; | |
struct no *esq, *dir; | |
}parvore; | |
void inserir(struct arvore *plist, char valor){ | |
if(plist == NULL){ | |
plist = (parvore) malloc(sizeof(struct arvore)); | |
plist->info = valor; | |
plist->esq = NULL; | |
plist->dir = NULL; | |
}else{ | |
if(valor < plist->info) | |
inserir(&plist->esq, valor); | |
else | |
inserir(&plist->dir, valor); | |
} | |
} | |
int main(){ | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment