All pastes #963942 Raw Edit

Something

public text v1 · immutable
#963942 ·published 2008-03-30 22:29 UTC
rendered paste body
//bibliotecas
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>

struct NOH_LISTA{
       int info;
       struct NOH_LISTA *pont;
       };

typedef struct NOH_LISTA *LISTA;

void ordena(LISTA *, LISTA *, LISTA *);

int main()
{
    getchar();
}

void ordena(LISTA *des, LISTA *ord, LISTA *fim)
{
     LISTA p;
     
     p = *ord;
     
     if(des->info < p->info){
        if(p->pont == NULL){
           p->pont = des;
           p = *des;
           des->pont = NULL;
           return ordena(p->pont,fim,fim);
        }
        else
           ordena(des,p->pont,fim);
     }
     else{
        p = *des;
        des->pont = ord;
        *fim = des;
        return ordena(p->pont,des,fim);
     }
}