![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构和算法学习随笔
数据结构和算法学习随笔
liubingle
这个作者很懒,什么都没留下…
展开
-
单链表增删改遍历
public class SingleLinkedListDemo { public static void main(String[] args) { Hero hero = new Hero(1, "lbl", "刘槟乐"); Hero hero1 = new Hero(2, "lbl222", "刘槟乐222"); Hero hero2 = new Hero(3, "lbl333", "刘槟乐333"); Hero hero3原创 2020-10-14 17:27:49 · 89 阅读 · 0 评论 -
数组队列和循环数组队列
public class ArrayQueueDemo { public static void main(String[] args) { ArrayQueue queue = new ArrayQueue(3); boolean flag=true; char key=' ';//接收用户输入 Scanner scanner = new Scanner(System.in); while (flag){原创 2020-10-11 11:36:38 · 140 阅读 · 0 评论 -
稀疏数组和二维数组的相互转换
二维数组转化为稀疏数组: //创建一个原始二维数组 //0表示无子,1表示黑子,2表示白子 int arr[][]=new int[11][11]; arr[1][2]=1; arr[2][3]=2; for (int arr1[] :arr){ for (int data:arr1){ System.out.printf("%d\t",data);原创 2020-09-28 17:06:17 · 197 阅读 · 0 评论