摘要:
什么是约瑟夫环? 就是数小孩游戏: 直接上代码: 要实现这个,只需要理清思路就好了 孩子节点: class Boy{ int no;//当前孩子的编码 Boy next; // 下一节点 public Boy(int no) { this.no = no; } public Boy(int no, 阅读全文
摘要:
直接上代码: public class CircleArrayQueueLvcai { private int[] array; private int maxSize;//循环队列大小 private int front; // 队列头, 这里约定初始值为0, private int rear ; 阅读全文