搜索资源列表
最大k乘积问题
- /*最大k乘积问题 问题描述: 设I是一个n位十进制整数。如果将I划分为k段,则可得到k个整数。这k个整数的乘积称为I的一个k乘积 。 试设计一个算法,对于给定的I和k,求出I的最大k乘积(n<=10)。 示例:输入为 : 4 3 结果:1234 */-/ k * Product of the biggest problems Descr iption : I set up is a n-bit decimal integer. If I will be divided into k, k
panduanzhongxinduicheng
- 设单链表中存放有n个字符,试编写算法,判断该字符串是否有中心对称的关系,例如xyzzyx是中心对称的字符串。-Store located in a single list has n characters, the preparation of test algorithm, the string to determine whether there is any relationship between the centro-symmetric, for example, is centro-
Hashset
- 一个拼写检查程序,用来检查你的输入的文件中的单词是否拼写错误,并给你给出可能的拼写建议。(用Hashset实现)(卡耐基梅隆大学ssd5数据结构Option Exercise4答案) 程序参数设置(第一个为要输入的词库文件,本例中是wordlist.txt, 第二个为要检查的文件,必须为txt格式,本例中用test.txt来检查)-A spelling checker to check your input file is misspelled words, and give you a p
BBB
- 设有一个有向图存储在邻接表中。试设计一个算法,按深度优先搜索策略对其进行拓扑排序。并以右图为例检验你的算法的正确性。-There is a directed graph stored in the adjacent table. Trial design an algorithm, depth-first search strategy by the topology of its sort. And to test your example picture on the right algor
2-9
- 假设在长度大于1的单循环链表中,既无头结点也无头指针。s为指向某个结点的指针,试编写算法删除结点*s的直接前驱结点,该程序是数据结构的范例-Assuming the single cycle in length greater than 1 in the list, neither the first nor the head node pointer. s is a pointer pointing to a node, delete node algorithm test preparati
project1
- 本科数据结构课程中的一个实验例子,内含代码及实验报告-Undergraduate data structures course a test example of the report containing the code and experiment
khbp
- 数据结构:括号匹配实例 输入一串表达式进行括号匹配试验 适合学生-Data Structure: Matching brackets parentheses example enter a string expression to match the test for students
Lecture-of-Dynamic-Programming-(DP)
- 上算法设计课课同学自己准备的讲座,ppt通过举例详细介绍了动态规划的原理,并附有实现源码与测试数据-Division on the algorithm design students prepare their own lectures, ppt described in detail by way of example the principles of dynamic programming, together with source code and test data to achiev
fangzhendianti
- 模拟某校九层教学楼的电梯系统。该楼有一个自动电梯,能在每层停留。九个楼层由下至上依次称为地下层、第一层、第二层、……第八层,其中第一层是大楼的进出层,即是电梯的“本垒层”,电梯“空闲”时,将来到该层候命。 乘客可随机地进出于任何层。对每个人来说,他有一个能容忍的最长等待时间,一旦等候电梯时间过长,他将放弃。 模拟时钟从0开始,时间单位为0.1秒。人和电梯的各种动作均要消耗一定的时间单位(简记为t),比如:有人进出时,电梯每隔40t测试一次,若无人进出,则关门;关门和开门各需要20t;每个
Test
- 一个C++例子程序,同时涉及到C中的链表和C++中的类。 增加了一定的注释。-A C++ example programs, and related to the linked list in C and C++ classes. Add some comments.
elevator-simulation
- 电梯模拟,模拟某校九层教学楼的电梯系统。该楼有一个自动电梯,能在每层停留。九个楼层由下至上依次称为地下层、第一层、第二层、……第八层,其中第一层是大楼的进出层,即是电梯的“本垒层”,电梯“空闲”时,将来到该层候命。 乘客可随机地进出于任何层。对每个人来说,他有一个能容忍的最长等待时间,一旦等候电梯时间过长,他将放弃。 模拟时钟从0开始,时间单位为0.1秒。人和电梯的各种动作均要消耗一定的时间单位(简记为t),比如:有人进出时,电梯每隔40t测试一次,若无人进出,则关门;关门和开门各需要2
prime-test
- 素数测试问题(Monte Carlo算法) 求am(mod n)的算法(m≤n) 设m的二进制表示为bkbk-1…b1b0(bk=1,且k≈log2m)。 例:m=41=101001(2),bkbk-1…b1b0=101001,(k=5)。 求am可以用下述方法:初始C←1。 -Prime number test problem ( Monte Carlo algorithm) Seek am ( MOD n ) algorithm ( M = n) A
Elevator-simulation
- 模拟时钟从0开始,时间单位为0.1秒。人和电梯的各种动作均要消耗一定的时间单位(简记为t),比如:有人进出时,电梯每隔40t测试一次,若无人进出,则关门;关门和开门各需要20t;每个人进出电梯均需要25t;如果电梯在某层静止时间超过300t,则驶回1层侯命。-Analog clock, starting at 0 time of 0.1 seconds. And lift a variety of actions have to consume a certain unit of time (
Lagranges-interpolation
- 拉格朗插值算法实现。该例子用c++实现拉格朗日差值算法,代码已经进过测试,可直接运行-LaGrand interpolation algorithm. The example used c++ Lagrangian difference algorithm, the code has been to test, and can be run directly
UVaOJ-401(Palindromes)
- 判断输入字符串是否为镜像或回文串。 来源于UVaOJ - 401. 水题。-A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from left to rig
test_QUEUE
- 队列-(FIFO)的实现一种示例,包括接口文件及其实现文件,测试文件等。在CFree下验证成功,包括CFree工程文件-Queue- (FIFO) to achieve one example, includes interface files and implementation files, test files. Verification is successful in CFree, including CFree project file
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
堆排序
- 堆排序示例,用数组实现的小顶堆,面试笔试常考题(a code example of heap sort, merge sort and quick sort, it's useful when you have a test)
KDTreeTest
- KD tree 实现算法,内有测试例子参考,可以学习里面的内容和思想。(KD tree algorithm.There is a test example of reference, and can learn the contents and ideas inside.)