
数据结构与算法
pumpkin8866
这个作者很懒,什么都没留下…
展开
-
数据结构与算法-环形队列-使用数组来模拟队列
在上一个队列中 我们的队列是不可复用的假设长度为3 你丢三个数据进去 然后再取出来三个数据但是还是会提醒你队列满了 就是因为它不是环形队列如何做成环形队列呢下面是示意图跟思路实现代码:...原创 2020-07-11 20:42:37 · 160 阅读 · 0 评论 -
数据结构与算法-队列-使用数组来模拟队列
1.使用数组来模拟队列public class ArrayQueueDemo { public static void main(String[] args) { ArrayQueue arrayQueue = new ArrayQueue(3); char key=' ';//接收用户输入 Scanner scanner=new Scanner(System.in); boolean loop=true; .原创 2020-07-11 20:17:57 · 242 阅读 · 0 评论 -
数据结构与算法-稀疏数组与二维数组
public class SparseArray { private static boolean inWrite(String fineName) throws IOException { File file = new File(fineName); InputStream in = null; try { in = new FileInputStream(file); byte[] dat...原创 2020-07-11 20:16:45 · 245 阅读 · 0 评论