2017年12月31日

数组求和(递归和循环)函数 时间性能测量(最差情形)

摘要: #include #include #define MAX_SIZE 1000typedef struct { double duration; long repetitions;}times;double sum_f(double list[], int n);do... 阅读全文

posted @ 2017-12-31 22:12 MACHINE_001 阅读(129) 评论(0) 推荐(0) 编辑

矩阵转置函数时间性能测量(最差情形)

摘要: #include#include#define MAX_SIZE 100#define SWAP(x, y, t) ((t)=(x), (x)=(y),(y)=t)void transpose(int a[][MAX_SIZE],int n);int main(voi... 阅读全文

posted @ 2017-12-31 22:09 MACHINE_001 阅读(129) 评论(0) 推荐(0) 编辑

冒泡排序时间性能测量(最差情形)

摘要: #include#include#define MAX_SIZE 1001#define SWAP(x,y,t) ((t)=(x),(x)=(y),(y)=t)void sort(int [], int);int main(void){ int step=10; in... 阅读全文

posted @ 2017-12-31 22:05 MACHINE_001 阅读(261) 评论(0) 推荐(0) 编辑

导航