摘要
对一种扑克牌游戏及Josephus逆问题进行推广得到类Josephus逆问题,探讨这类问题的最佳求解方法——基于双端队列求解,给出双端队列的循环顺序实现,重点探讨在顺序循环双端队列的基础上的这类问题的求解方法及算法分析.实验结果表明,利用双端队列,此问题不仅易于求解,也易于验证解的正确性.
The Josephus-like inverse problem was defined firstly,which generalized a kind of poker game and the Josephus inverse problem,then the best way to solving the problem based on double-ended queue was studied.The double-ended queue was represented as a sequential circular list.Based on this data structure,the algorithm for the Josephus-like inverse problem and the performance analysis were given in detail.By the performance of a program,the way based on the double-ended queue was not only easy to solve the problem,but also easy to show the algorithm.
出处
《湖北大学学报(自然科学版)》
CAS
2013年第3期375-380,共6页
Journal of Hubei University:Natural Science
基金
湖北省教育厅项目(Q20101004)资助