設(shè)計(jì)一個(gè)測試程序比較幾種內(nèi)部排序算法的關(guān)鍵字比較次數(shù)和移動次數(shù)以取得直觀感受。 基本要求 :(1)對起泡排序、直接排序、簡單選擇排序、快速排序、希爾排序、堆排序算法進(jìn)行比較; (2)待排序表的表長不小于1000,表中數(shù)據(jù)隨機(jī)產(chǎn)生,至少用5組不同數(shù)據(jù)作比較,比較指標(biāo)有:關(guān)鍵字參加比較次數(shù)和關(guān)鍵字的移動次數(shù)(關(guān)鍵字交換記為3次移動); (3)輸出比較結(jié)果。
上傳時(shí)間: 2017-02-05
上傳用戶:dbs012280
哈希表的建立、查找。設(shè)有若干個(gè)學(xué)生的考試成績,用學(xué)生的學(xué)號作為關(guān)鍵字,采用除留余數(shù)求哈希地址,將學(xué)生的信息存儲到該地址空間,并且采用線性探測法解決沖突問題。
標(biāo)簽:
上傳時(shí)間: 2014-01-25
上傳用戶:windwolf2000
鏈表的實(shí)現(xiàn)初始化,完整代碼,用C++編寫。
標(biāo)簽: 初始化
上傳時(shí)間: 2014-08-27
上傳用戶:lx9076
數(shù)字萬用表,可以測量0~5v的電壓值,精度達(dá)到+/-0.02v。
標(biāo)簽: 數(shù)字萬用表
上傳時(shí)間: 2017-05-15
上傳用戶:liglechongchong
一些數(shù)字電壓表的一些資料,用PPT就看打開看,里面有圖片
標(biāo)簽: 數(shù)字電壓表
上傳時(shí)間: 2013-12-26
上傳用戶:ynzfm
數(shù)據(jù)結(jié)構(gòu)中最經(jīng)常用到的,包括鏈表、雙鏈表、二叉樹、平衡二叉樹、哈希表等
標(biāo)簽: 數(shù)據(jù)結(jié)構(gòu)
上傳時(shí)間: 2014-01-23
上傳用戶:wendy15
模糊控制規(guī)則表的生成程序,用MATLAB的M文件編寫。
上傳時(shí)間: 2017-07-11
上傳用戶:yangbo69
兩個(gè)鏈表的交集 #include<stdio.h> #include<stdlib.h> typedef struct Node{ int data; struct Node *next; }Node; void initpointer(struct Node *p){ p=NULL; } int printlist(struct Node* head){ int flag=1; head=head->next; /* 因?yàn)闃?biāo)記1的地方你用了頭結(jié)點(diǎn),所以第一個(gè)數(shù)據(jù)域無效,應(yīng)該從下一個(gè)頭元結(jié)點(diǎn)開始 */ if(head==NULL) printf("NULL\n"); else { while(head!=NULL) { if(flag==1) { printf("%d",head->data); flag=0; } else { printf(" %d",head->data); } head=head->next; } printf("\n"); } return 0; } struct Node *creatlist(struct Node *head) { int n; struct Node *p1=(struct Node *)malloc(sizeof(struct Node)); p1->next=NULL; while(scanf("%d",&n),n!=-1) { struct Node *pnode=(struct Node *)malloc(sizeof(struct Node)); pnode->next=NULL; pnode->data=n; if(head==NULL) head=pnode; p1->next=pnode; p1=pnode; } return head; } struct Node *Intersect(struct Node *head1, struct Node *head2) { struct Node *p1=head1,*p2=head2;/*我這里沒有用頭指針和頭結(jié)點(diǎn),這里是首元結(jié)點(diǎn)head1里面就是第一個(gè)數(shù)據(jù),一定要理解什么事頭指針, 頭結(jié)點(diǎn),和首元結(jié)點(diǎn) 具體你一定要看這個(gè)博客:http://blog.sina.com.cn/s/blog_71e7e6fb0101lipz.html*/ struct Node *head,*p,*q; head = (struct Node *)malloc(sizeof(struct Node)); head->next = NULL; p = head; while( (p1!=NULL)&&(p2!=NULL) ) { if (p1->data == p2->data) { q = (struct Node *)malloc(sizeof(struct Node)); q->data = p1->data; q->next = NULL; p->next = q;//我可以認(rèn)為你這里用了頭結(jié)點(diǎn),也就是說第一個(gè)數(shù)據(jù)域無效 **標(biāo)記1** p = q; p1 = p1->next; p2 = p2->next; } else if (p1->data < p2->data) { p1 = p1->next; } else { p2 = p2->next; } } return head; } int main() { struct Node *head=NULL,*headt=NULL,*t; //initpointer(head);//這里的函數(shù)相當(dāng)于head=NULL; // initpointer(headt);//上面已經(jīng)寫了headt=NULL那么這里可以不用調(diào)用這個(gè)函數(shù) head=creatlist(head); headt=creatlist(headt); t=Intersect(head,headt); printlist(t); }
標(biāo)簽: c語言編程
上傳時(shí)間: 2015-04-27
上傳用戶:coco2017co
當(dāng)計(jì)算太陽系某行星相對太陽或者相對其他行星的位置和速度的時(shí)候,在精度不太高的情況下,可以用行星的平均根數(shù)解析的得出,但是如果需要計(jì)算其高精度的位置和速度的時(shí)候,通常采用NASA(美國航空航天局)的JPL(噴氣推進(jìn)實(shí)驗(yàn)室)給出的行星精密歷表(DE200,DE403,DE405)。
上傳時(shí)間: 2016-05-19
上傳用戶:eeworm
DM3068 數(shù)字萬用表 如您在使用此產(chǎn)品或本手冊的過程中有任何問題或需求,可與 RIGOL 聯(lián)系: 電子郵箱: service@rigol.com 網(wǎng)址: www.rigol.com
標(biāo)簽: 3068 DM 數(shù)字萬用表
上傳時(shí)間: 2017-02-04
上傳用戶:aarons大叔
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1