-
双端堆是支持双端优先队列的插入、删除最小元素和最大元素等操作的堆。
双端堆可以在对数时间内完成上述所有的操作。...
双端堆是支持双端优先队列的插入、删除最小元素和最大元素等操作的堆。
双端堆可以在对数时间内完成上述所有的操作。
-Double-ended heap to support double-ended priority queue insert, delete the smallest element and the largest such operation of the reactor element. Double-ended heap in logarithmic time to complete all of the above operation.
- 2022-03-24 12:26:12下载
- 积分:1
-
数据结构——链表(双向循环链表)
双向循环链表节点:数据域+指针域指针域:一个指针指向前一个同类型节点,另一个指针指向后一个同类型节点(1)设计节点struct db_node{int data;struct db_node * prev;struct db_node * next;};(2)创建空链表//创建了一个只有头节点的双向循环链表,返回头节点的地址struct db_node * create_db_list(void){struct db_node * phead = (struct db_node *)malloc(sizeof(struct db_node));if(phead == NULL)exit(-1);else{phead->next = phead;phead->prev = phead;}return phead;}(3)制造新节点//制造新节点,返回新节点的地址struct db_node * make_db_node(int value){struct db_node * pnew = (struct db_node *)malloc(sizeof(struct db_node));if(pnew == NULL)printf("malloc failed!
");else{pnew->data = value;pnew->next = NULL;pnew->prev = NULL;}return pnew;}(4)插入节点//把pnew指向的节点插入到头节点的前面,也就是整个链表的末尾bo
- 2022-02-14 07:06:11下载
- 积分:1
-
约瑟夫问题有原始的约瑟夫和发展了的约瑟夫两种。 原始的约瑟夫的描述: 古代某法官要判决N个犯人的死刑,他有一条荒唐的法律,将犯人站成一个圆圈,从第S个人开始数起...
约瑟夫问题有原始的约瑟夫和发展了的约瑟夫两种。 原始的约瑟夫的描述: 古代某法官要判决N个犯人的死刑,他有一条荒唐的法律,将犯人站成一个圆圈,从第S个人开始数起,每数到第D个犯人,就拉出来处决,然后再数D个,数到的人再处决―――直到剩下的最后一个可赦免。 发展的约瑟夫的描述: 古代某法官要判决N个犯人的死刑,但这N个人每人持有一个密码,他有一条荒唐的法律,将犯人站成一个圆圈,法官先给出一个密码M,从第S个人开始数起,每数到第M个犯人,就拉出来处决,再根据这个人所持有的密码F,然后再数F个,数到的人再处决,以此类推―――直到剩下的最后一个可赦免。-Joseph problems have original development of the Joseph and Joseph two. The original Joseph Description : Ancient a judge to sentence N inmates of the death penalty, he is a ridiculous law, prisoners station into a circle, from S began a few individuals, every few months to D prisoners, pull out executions, then D, the number of people to be re-executed--- until the last one left to be pardoned. The development of the Joseph Description : Ancient a judge to sentence N inmates of the death penalty, but each individual N holders a password, he is a ridiculous law, prisoners station into a circle, the judges first gave a password M, S individuals from the beginning of several, each of the first few inmates M , pull hi
- 2022-03-11 16:54:39下载
- 积分:1
-
浙大acm在线评判系统zju online judge上面的题目解答源码(1),对于想要提高自己编程能力的同学来说是极好的资料,网上一般不会把这些源代码贴出,本...
浙大acm在线评判系统zju online judge上面的题目解答源码(1),对于想要提高自己编程能力的同学来说是极好的资料,网上一般不会把这些源代码贴出,本人此次奉献出,也是想为广大编程爱好者做点贡献。-Zheda acm online evaluation system zju online judge the subject to answer the above source (1), for the programming you want to improve their own ability to students is excellent information, the Internet is generally not the source code of these posted, I am the dedicated, but also for the general programming enthusiasts would like to做点贡献.
- 2022-08-18 13:11:05下载
- 积分:1
-
Beijing Bus Inquiry System Beijing Bus Inquiry System
北京公交车查询系统
北京公交车查询系统-Beijing Bus Inquiry System Beijing Bus Inquiry System
- 2022-02-03 12:07:35下载
- 积分:1
-
Data dictionary description of the database design a great help to
数据字典的说明,对数据库设计有极大的帮助-Data dictionary description of the database design a great help to
- 2022-12-03 21:15:03下载
- 积分:1
-
在一个圆形操场的四周摆放着n堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的两堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算...
在一个圆形操场的四周摆放着n堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的两堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算法,计算出将n堆石子合并成一堆的最小得分和最大得分,并分析算法的计算复杂度。-in a circle around the playground are placed n gravel pile. Is a stone should order to be merged into a heap. Stipulated that only elected adjacent to the pile of gravel into the new heap, and a new pile of gravel credited for the combined scores. Design a test algorithm to calculate n heap into a pile of gravel to the minimum score and the biggest score and analysis of algorithm complexity.
- 2022-03-22 21:40:18下载
- 积分:1
-
python 文本压缩编码
描述 (英文): (提示: 至少 100 个字符。请尽你所能描述您的项目的详细信息。更好的内容将为您获得更多的分数)描述 (英文): (提示: 至少 100 个字符。请尽你所能描述您的项目的详细信息。更好的内容将为您获得更多的分数)描述 (英文): (提示: 至少 100 个字符。请尽你所能描述您的项目的详细信息。更好的内容将为您获得更多的分数)描述 (英文): (提示: 至少 100 个字符。请尽你所能描述您的项目的详细信息。更好的内容将为您获得更多的分数)
- 2022-12-21 15:25:04下载
- 积分:1
-
访问数据库,实现教务管理的功能
access数据库,实现教务管理的功能-access databases, realize the functions of educational administration
- 2023-07-18 07:35:03下载
- 积分:1
-
Database System Design (seventh edition).
数据库系统设计(第七版).-Database System Design (seventh edition).
- 2022-04-14 12:39:58下载
- 积分:1