Here I give two insertion sort, one use array, another use list. I also get a conclusion that nothing better in insertion_sort2 than insertion_sort, maybe the size is too large and too random which wi... Read More
posted @ 2012-06-29 09:06 Dance With Automation Views(174) Comments(0) Diggs(0)
1: #include <stdio.h> 2: #include <stdlib.h> 3: #define MAX_LENGTH 9999 4: void print_array(const int a[],int size) 5: { 6: int i=0; 7: for(i=0;i<size;i++) 8: { 9: printf("%d,",a[i]); 10: } 11: printf("\n"); 12: } 13: 14: /* 15: as... Read More
posted @ 2012-06-29 09:02 Dance With Automation Views(1708) Comments(0) Diggs(0)