搜索资源列表
求解约瑟夫问题
- 求解约瑟夫问题。设有n个人围成一个圆圈坐下,对所有围从的人从某个位置开始编号为1,2,3,……,n,从编号为1的人开始报数1,报数依交进行,报数n的人即出列,下一个人从1开始报数,再报数m的人便是第二个出列的人如此重复下去,直到最后一个人出列为止,于是便得到一个出列的顺序,这称之为约瑟夫(Josephu)问题。-solving problems. N individuals have formed a circle to sit down, all right Wai from the star
数据结构算法与应用-C++语言描述123章
- C++的数据结构算法,pdf格式的.这是第一,二,三章.以后的我会陆续传的.-C data structure algorithms, pdf format. This is the first, two, three chapters. Later I will continue to obscure.
nqueens9901
- 著名的n皇后问题。实现结果为 请输入这是一个几皇后问题:4 4皇后问题有解为: 2 4 1 3 4皇后问题有解为: 3 1 4 2 Press any key to continue -n Queen's famous question. To achieve results Please enter several This is a Queen's : 4 Queen of the solutions to these problems : 2 4
fox
- Turbo C - (C) Copyright 1987, 1988 by Borland International */ #define S_IREAD 0x0100 /* from SYS\\STAT.H */ #define S_IWRITE 0x0080 /* from SYS\\STAT.H */ #define TRUE 1 #define FALSE 0 #define MSGHEADER \"MICROCALC - A Turbo C D
a
- Recognizing its importance is only the fist step to advocate invetion or innovation, and some effective measures should be taken for it. For one thing, our authority should continue to enlarge the recruit of graduate. For another, the conditions of
救护车调度模拟系统
- 用c语言设计实现一个用事件驱动的“救护车调度”离散模型,模拟120急救中心响应每个病人的呼救信号统一调度救护车运行的情况。 我们对问题作适当简化,假设:某城市共有m个可能的呼救点(居民小区、工厂、学校、公司、机关、单位等),分布着n所医院(包含在m个点中),有k辆救护车分派在各医院待命,出现呼救病人时,由急救中心统一指派救护车接送至最近的医院救治。救护车完成一次接送任务后即消毒,并回原处继续待命。假定呼救者与急救中心、急救中心与救护车之间的通讯畅通无阻,也不考虑道路交通堵塞的影响。可以用m个顶点
training
- 某企业将挑选一批新员工进行培训,遵循以下规则: 将所有员工排成1个圈,从12点位置开始编号为1,逆时钟方向编号到N,第N号员工在第1号的左手边 两位培训官开始选择员工,培训官甲从1号开始逆时钟方向数,数到第k号员工停下;培训官乙从N号开始顺时钟方向数,数到第m号员工停下 被选中的第k号和第m号员工不是同一人,两人同时送往制造培训 被选中的第k号和第m号员工是同一人,将一人送往检测培训 接着继续往下数,培训官甲同样数到k就停止,培训官乙同样数到m就停止,重复上述的选择 输入
data_struture
- 经典书籍了。数据结构习题的讲解。非常有用!可以下去看看。严蔚敏版本。-Classic books. Exercises on data structure. Very useful! Can continue to see. YAN Wei-min version.
insertsort
- 插入法的基本工作原理是抽出一个数据,在前面的数据中寻找相应的位置插入,然后继续下一个数据,直到完成排序。-Insert the basic working principle of a data are drawn, in front of the data looking for the location of the corresponding insert, and then continue to the next data until the completion of sequenc
MergeSort
- 数据结构--合并排序法.基本是将两笔已排序的数据合并并进行排序,如果所读入的数据尚未排序,可以先利用其它的排序方式来处理这两笔资料,然后再将排序好的这两笔数据合并。 只要将所有的数字不断的分为两个等分,直到最后剩一个数字为止,然后再反过来不断的合并。 -Data structure- merge sort method. Is basically the two pens had been sorted and sort data consolidation, if the read d
erchashudeshixian
- 用C语言写的二叉树的实现,希望大家在学习中不断进步-Written using C language implementation of binary tree, I hope we continue to progress in learning
shudeshixian
- 自己用C语言写的树的实现,希望大家在学习中不断进步-Using C language to write their own implementation of the tree, I hope we continue to progress in learning
Test(2)
- 用循环单链表实现: N个人围圆圈而坐,分别标以数字1到N。从坐在1号的位置的人开始依次传递土豆。M次传递之后,拿到土豆的人被排除,圆圈收缩,然后从离开圆桌的人后面的那个人开始继续游戏。游戏一直进行,直到留下最后一个人,为赢家。因此,如果M=0且N=5,所有的人依次被排除,5号最后胜利。如果M=1且N=5,排除的顺序为2,4,1,5. -Achieved with cyclic single-linked list: N individuals sitting around a circl
Maze(Stack)
- 应用栈求迷宫通路,用的是“穷举求解”的方法,即从入口出发,顺某一方向向前探索,若能走通,则继续往前走;否则沿原路退回,换一个方向再继续探索,直至探索到通路为止。-Application stack requirements maze path, using a "brute-force solving" approach, starting from the entrance, along a forward direction to explore, if we go through, the
mi-gong-wen-ti
- 通过队列和栈实现迷宫问题 最后走出迷宫 设置上下左右的路线 不断的进行出战和入栈 -Achieved through the queue and a stack maze of issues about the final out of the maze of setting up and down the line played and continue to conduct stack
2(2)
- 最小生成树之Prim算法 Prim算法用于求无向图的最小生成树 设图G =(V,E),其生成树的顶点集合为U。 ①、把v0放入U。 ②、在所有u∈U,v∈V-U的边(u,v)∈E中找一条最小权值的边,加入生成树。 ③、把②找到的边的v加入U集合。如果U集合已有n个元素,则结束,否则继续执行②。 其算法的时间复杂度为O(n^2) Prim算法实现: (1)集合:设置一个数组set(i=0,1,..,n-1),初始值为 0,代表对
c
- 这是殷人昆写的数据结构(c++)(ppt格式的) 我觉得这个是学习过C++,而且又继续学习数据结构的好资料-This data structure is written Yanren Kun (c++) (ppt format) I think this is learned C++, data structures, and they continue to learn good information
si
- 数据结构课件,第十章到第十二章,希望这个课件能有帮助,以后会继续上传其余几章-Data structures courseware, chapter to chapter XII, I hope this courseware can help, the future will continue to upload the remaining chapters
Data-structure-descripted-by-CPP
- C++描述的数据结构教程。 殷人昆主编,本书着重介绍面向对象数据结构设计。-C++ data structures described in tutorial. Yan Renkun editor, finished the book for learning C++ language and continue to strengthen the C++ syntax and object-oriented data structure design.
002
- 华为数据结构笔试题解答,题目要求,若干老鼠围成一圈,一只猫绕着这些老鼠转圈,每隔若干只老鼠就吃掉一只,然后继续转,依次循环……求老鼠被吃掉的顺序。-Huawei data structure pen test solutions, the topic request, some mice round into 1 turn, a cat around these mice every round, and some mouse will eat a, and then continue to t