资源列表
[数据结构常用算法] Joseph
说明:约瑟夫(Joseph)问题的一种描述是:编号为1,2,..., n 的n 个人按顺 时针方向围坐一圈, 每人持有一个密码(正整数)。一开始选任一个正整数作 为报数上限值m, 从第一个人开始按顺时针方向自1开始顺序报数,报到m时 停止报数。报m的人出列,将它的密码作为新的m值,再从下个人开始新一轮 报数,如此反复,直到剩下最后一人则为获胜者。试设计一个程序求出出列顺 序。-Joseph (Joseph) a descr iption of the problem is: th<zhujiei> 在 2025-06-10 上传 | 大小:1kb | 下载:0
[数据结构常用算法] E_Malevich-Strikes-Back!
说明:Ural 1221 Malevich Strikes Back代码,简洁明了,通过搜索正方中心坐标并判定来实现- After the greatest success of Malevich s Black Square the famous artist decided to create a new masterpiece. He took a large sheet of checked paper and filled some cells with black. After tha<Jerry> 在 2025-06-10 上传 | 大小:1kb | 下载:0
[数据结构常用算法] Knapsack-problem
说明:假设有一个能装入总重量为T的背包和n 件重量分别为W1,W2,W3,...,Wn的物品。编写算法从n件物品中挑选若干件恰好装满背包,即使得Wi1+Wi2+...+Win=T.(W旁边的字符皆为角标)。要求找出满足条件的所有解。-Suppose there is a load of T of the total weight of W1, N, W2, W3, Wn. Algorithm is compiled n items selected several pieces just loade<chenchen> 在 2025-06-10 上传 | 大小:1kb | 下载:0
[数据结构常用算法] Linear-table-operation
说明:1,线性表在顺序存储结构上的建立、插入、删除运算。 2,线性表在链接存储结构上的建立、插入、删除运算。-1, the establishment, insertion and deletion of the linear table in the sequential storage structure. 2, the linear table in the link storage structure, the establishment, insertion, delete ope<chenchen> 在 2025-06-10 上传 | 大小:1kb | 下载:0
[数据结构常用算法] Binary-Tree
说明:(1)实现二叉树的构造过程,并打印出二叉树 (2)对该二叉树分别用层序、前序、中序和后序四种不同的方法进行遍历; (3)将该二叉树的所有左右子树进行交换,得到新的二叉树,并打印出该二叉树; (4)对新获得的二叉树分别用层序、前序、中序和后序四种不同的方法进行遍历。-(1) the construction process to achieve the two fork tree, and print out the two fork tree<chenchen> 在 2025-06-10 上传 | 大小:1kb | 下载:0
[数据结构常用算法] RB_TREE(CPP)
说明:C++红黑树的实现 实现了一颗红黑树的建立 并使用了设计模式中的visitor完成打印和求和-The red black tree The establishment of a complete tree and the use of design patterns in the visitor print and summation<王> 在 2025-06-10 上传 | 大小:1kb | 下载:0
[数据结构常用算法] Direct-insertion-method-main2
说明:这是用C++语言写的一个用直接排序法排序的程序-This is written in c++ language a program that sorted by direct sequencing method<流川枫> 在 2025-06-10 上传 | 大小:1kb | 下载:0