#include<stdio.h>
#include"list.h"
#include<stdlib.h>
void LLreverse(list_t* list)
{
//count the number of elements in list
int count =0;
for(element_t*el = list->head; el; el = el->next){
count++;
}
// printf("%d",count );
}
int main(){
list_t* list =list_create();
for(int i =0; i<5; i++){
list_append(list,i);
}
LLreverse(list);
list_destroy(list);
return 0;
}
No comments:
Post a Comment