文件名称: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 constitute a one-way circular linked list of n nodes, and then from the first k node from 1 began to count, count to m, the corresponding node is removed from the list.Then the next node from the deleted node continues to count from 1...And so on, until all the nodes are listed, the program ends.)
用一个不带头节点的循环链表来处理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 constitute a one-way circular linked list of n nodes, and then from the first k node from 1 began to count, count to m, the corresponding node is removed from the list.Then the next node from the deleted node continues to count from 1...And so on, until all the nodes are listed, the program ends.)
相关搜索: 约瑟夫
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1.joseph(约瑟夫)\2.不带头结点的循环链表.png
1.joseph(约瑟夫)\3.joseph代码buf解决方案.png
1.joseph(约瑟夫)\约瑟夫问题.doc
1.joseph(约瑟夫)
1.joseph(约瑟夫)\3.joseph代码buf解决方案.png
1.joseph(约瑟夫)\约瑟夫问题.doc
1.joseph(约瑟夫)