搜索资源列表
004
- 约瑟夫问题-Joseph
求解约瑟夫问题
- 求解约瑟夫问题。设有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语言实现阅瑟夫环,是利用数据结构实现的-Realize the Joseph Ring with C language, and it is realized with data structure.
forgive
- joseph的程序对很多C初学者有着很大的帮助,用C++程序实现的-many of the procedures C beginners have great help with the C Programming
7.约瑟夫环
- 约瑟夫环的问题,这是一个比较经典的编程实例,我做了一个小程序来实现了其算法-Joseph Central, which is a more classical programming examples, I had a small program to achieve its algorithm
Joseph-Central-issues
- 约瑟夫环问题简单实现,递归算法,(带注释)可以利用此算法解决栈存储的约瑟夫环问题.-Joseph Central issues, C++ source code and notes
Joseph
- 约瑟夫(Joseph)问题的一种描述是:编号为1,2,..., n 的n 个人按顺 时针方向围坐一圈, 每人持有一个密码(正整数)。一开始选任一个正整数作 为报数上限值m, 从第一个人开始按顺时针方向自1开始顺序报数,报到m时 停止报数。报m的人出列,将它的密码作为新的m值,再从下个人开始新一轮 报数,如此反复,直到剩下最后一人则为获胜者。试设计一个程序求出出列顺 序。-Joseph (Joseph) a descr iption of the problem is: th
Joseph
- 用单链表编一个约瑟夫环问题。设编号为1,2,• • • ,n的n个人围坐一圈,约定编号为k(1≤k≤n)的人从1开始报数,数到m的那个人出列,他的下一位又从1开始报数,数到m的那个人又出列,依次类推,直到所有人出列为止,由此产生一个出队编号的序列。压缩文件里面包括了代码,运行文件,还有实验报告。-Joseph compiled a list with a single ring problem. Let numbered 1,2, n individual R
Joseph-ring
- 数据结构,这个小程序主要用链表约瑟夫环问题。-The data structure,This small program mainly with the problem of Joseph ring chain table。
Joseph-Problem
- 给出了约瑟夫问题的数学解法(文档)和几个C语言代码-A mathematical solution to Joseph Problem and three programs of C
Joseph
- 解决约瑟夫问题:输入N个数,从第n个数开始,每过i个数输出一个数,最后得到N个数的输出顺序-Joseph problems to solve: the number of N input the first number n, every i-th output over a number finally get the output sequence number N
joseph
- 数据结构课上的一点小作业,也不知道有没有用。很简单的joseph环-A little lesson on operating procedures
Joseph-Problem
- 约瑟夫问题。设有n个人做作圆桌周围,从第s个人开始报数,报到m的人出列,然后再从下一个人开始报数,数到m的人又出列,如此重复,直到所有的人都出列为止。要求按出列的先后顺序输出每个人的信息。-Joseph problems. N individual has contrived around the round table, I began to count off s individual report m people out of the column, and then began to
DataStructureExe-Joseph
- 约瑟夫环的实现,使用无头结点的循环链表,接收数值并输出编号-A easy solution to Joseph question
Joseph-problem
- 约瑟夫问题:约瑟夫问题是个有名的问题:N个人围成一圈,从第一个开始报数,第M个将被杀掉,最后剩下一个,其余人都将被杀掉。-Joseph: Joseph is a famous problems: N individuals in a circle, starting the first number off, the first M will be killed, the last one, the others will be killed.
Joseph.cpp
- 一个小游戏,约瑟夫环的源代码。其中可以更改参与人数,或者改成从文件中传入数据,以快速获取多个结果。-A small game- Joseph Central source code.
1.joseph(约瑟夫)
- 解题思路: 用一个不带头节点的循环链表来处理joseph问题:先构成一个有n个节点的单向循环链表,然后从第k结点从1开始计数,计数到m的时候,对应结点从链表中删除。然后再从被删结点的下一个节点继续从1开始计数.......,以此类推,直到所有的结点都列出时,程序结束。(Problem solving: With a circular linked list node don't take the lead to handle the problem of Joseph: first cons
Joseph
- 数据结构约瑟夫环,利用数据结构中的循环链表以及递归的使用实现约瑟夫环(Data structure Joseph ring, using the data structure of the circular list and recursive use to achieve the Joseph ring)