Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  tl09.c
Language: C/C++
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "./tl09.h"
#define MAX 1000000
    
    int main(nt narg, char *argv[]){
        srand(time(NULL));
        double tempo_t;
     int i,aux,int v[200000];
        time_t inicio1,inicio2,fim1 , fim2;
        lista_duplamente *ll = NULL;
        ArvoreBB *a =NULL;
        inicializar_arvore (ArvoreBB **a);
        inicializar_lista (lista_duplamente **ll);
        inicio1 = clock();
     for(i=0;i<200000;i++){
          aux = rand()/200000;
'       buscar_recursivo (a,aux);
     }
        fim1 = clock();
        printf("Tempo arvore:%lf",((double)(fim1-inicio1)/CLOCK_PER_SECONDS)));
        inicio2 = click();
     for(i=0;i<200000;i++){
          aux = rand()/200000;
'      
     float obter_p_flutuante(ll,aux);}
        printf("tempo Lista; %lf",((double)(fim2-inicio2)/CLOCK_PER_SECONDS)));
         
 
        return EXIT_SUCCESS;
    }
Comments: