![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
文章平均质量分 64
qq_40707462
这个作者很懒,什么都没留下…
展开
-
虚拟机 linux Ubuntu
linux原创 2022-11-01 19:30:57 · 145 阅读 · 1 评论 -
lua学习
lua原创 2022-07-31 18:22:02 · 439 阅读 · 3 评论 -
java多线程设计
交替打印 n 次,一个线程打印 foo ,另一个打印 barpublic class test { public static void main(String[] args) { //a,b这两个runnable Runnable a = ()->{ System.out.print("foo"); }; Runnable b = ()->{ System.out.p原创 2022-02-09 09:50:01 · 975 阅读 · 0 评论 -
acm处理输入输出Java
读一个整数: int n = sc.nextInt();读一个字符串:String s = sc.next();读一个浮点数:double t = sc.nextDouble();读一整行: String s = sc.nextLine();判断是否有下一个输入可以用sc.hasNext()或sc.hasNextInt()或sc.hasNextDouble()或sc.hasNextLine()1、输入一个intimport java.util.Scanner;public class cin原创 2022-02-28 21:37:21 · 486 阅读 · 0 评论 -
leetcode模板整理
1、DFS\BFS遍历树def dfs(root): if (root is None): return dfs(root.left) dfs(root.right)def bfs(root):#相当于层序遍历 queue=[] queue.append(root); while (queue): node = queue.pop(0)#弹出一个节点,然后挨个添加它的左右子树原创 2021-01-26 14:44:55 · 330 阅读 · 0 评论 -
leetcode java一些小语法
1、ArrayList①动态数组:[ [1,2,3] , [4,5,6] ]List<List<Integer>> res = new ArrayList<>();res.add(Arrays.asList(nums[i],nums[left],nums[right]))②List<int[]> res = new ArrayList<>();获取最后一个数:res.get(res.size()-1)[1]转换为数组:res.toAr原创 2021-08-30 21:14:26 · 510 阅读 · 0 评论