文件名称:shangchuan1
介绍说明--下载内容均来自于网络,请自行研究使用
利用单向循环链表存储结构模拟约瑟夫环
1本演示程序中,程序的设计要求用单向循环链表存储结构完成此次程序。
2按照出列的顺序引述各人的编号,即最后按照出列的先后顺序把出列人的编号依次输出。
3程序执行的命令包括:
1)构造循环链表;
2)删除指定的结点元素;
3)按照出列顺序输出出列人编号
构造循环链表时,需要把每个结点元素的密码输入。
4.测试数据
m的初值为20;n=7,7个人的密码依次是:3,1,7,2,4,8,4,首先m值为6(正确的出列顺序为6,1,4,7,2,3,5)。
-Using one-way linked list storage structure simulation Joseph Central a demo program, the program' s design cycle with a one-way linked list storage structure to complete the process. 2 quoted in accordance with the order of each column of numbers, that last out in accordance with the order of the numbers listed in order of the output. 3 program execution command, including: 1) circular linked list structure 2) Remove the specified node elements 3) according to the column number listed in order of output of a circular linked list structure, you need the password for each node element input. 4. Test data m of the initial value of 20 n = 7,7 personal password in order: 3,1,7,2,4,8,4, first of all m = 6 (right of the column order of 6 1,4,7,2,3,5).
1本演示程序中,程序的设计要求用单向循环链表存储结构完成此次程序。
2按照出列的顺序引述各人的编号,即最后按照出列的先后顺序把出列人的编号依次输出。
3程序执行的命令包括:
1)构造循环链表;
2)删除指定的结点元素;
3)按照出列顺序输出出列人编号
构造循环链表时,需要把每个结点元素的密码输入。
4.测试数据
m的初值为20;n=7,7个人的密码依次是:3,1,7,2,4,8,4,首先m值为6(正确的出列顺序为6,1,4,7,2,3,5)。
-Using one-way linked list storage structure simulation Joseph Central a demo program, the program' s design cycle with a one-way linked list storage structure to complete the process. 2 quoted in accordance with the order of each column of numbers, that last out in accordance with the order of the numbers listed in order of the output. 3 program execution command, including: 1) circular linked list structure 2) Remove the specified node elements 3) according to the column number listed in order of output of a circular linked list structure, you need the password for each node element input. 4. Test data m of the initial value of 20 n = 7,7 personal password in order: 3,1,7,2,4,8,4, first of all m = 6 (right of the column order of 6 1,4,7,2,3,5).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
利用单向循环链表存储结构模拟约瑟夫环.doc