Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef __TREE_H__
- #define __TREE_H__
- /*estrutura da arvore*/
- typedef struct no {
- int data;
- struct no* left;
- struct no* right;
- }tree;
- /*estrutura da fila*/
- typedef struct ptr{
- tree* data;
- struct ptr* anterior;
- struct ptr* proximo;
- }elemento;
- typedef struct {
- elemento* inicio;
- elemento* final;
- }fila;
- /*funçoes da arvore*/
- tree* cria_no();
- tree* inseri_na_arvore(tree* raiz, int dado);
- void pre_order(tree* raiz);
- void order(tree* raiz);
- void pos_order(tree* raiz);
- void em_largura(tree* raiz);
- /*funçoes da fila*/
- elemento* aloca_elemento(tree* data);
- fila* aloca_fila();
- void enfilera(tree* data, fila* lista);
- tree* desenfilera(fila* lista);
- int check_fila(fila* lista);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement