摘要: 直接上代码: class ArrayStack{ //用数组模拟栈 int maxSize; int[] stack; int top = -1;//表示栈顶 public ArrayStack(int maxSize) { this.maxSize = maxSize; this.stack = 阅读全文
posted @ 2020-05-31 21:55 死不了好气呦 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 直接上代码 //节点 class HeroNodeD{ int no; String name; String nickName; HeroNodeD pre;//前一节点 HeroNodeD next;//后一节点 public HeroNodeD(int no, String name, Str 阅读全文
posted @ 2020-05-31 14:03 死不了好气呦 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 什么是约瑟夫环? 就是数小孩游戏: 直接上代码: 要实现这个,只需要理清思路就好了 孩子节点: class Boy{ int no;//当前孩子的编码 Boy next; // 下一节点 public Boy(int no) { this.no = no; } public Boy(int no, 阅读全文
posted @ 2020-05-31 13:46 死不了好气呦 阅读(263) 评论(0) 推荐(0) 编辑