隐藏页面特效

02 2021 档案

摘要://后序遍历 public class Solution { //递归 public List<Integer> postorder(TreeNode root){ List<Integer> res=new ArrayList<>(); recur(root,res); return res; } 阅读全文 »
posted @ 2021-02-26 14:20 ForMei 阅读(79) 评论(0) 推荐(0) 编辑
摘要://中序遍历 public class Solution{ public List<Integer> inorder(TreeNode root){ //递归 List<Integer> res=new ArrayList<>(); recur(root,res); return res; } pu 阅读全文 »
posted @ 2021-02-26 14:18 ForMei 阅读(48) 评论(0) 推荐(0) 编辑
摘要://面试常考算法题之二叉树的先序遍历 public class Solution { public List<Integer> preorder(TreeNode root){ List<Integer> res=new ArrayList<>(); recur(root,res); return 阅读全文 »
posted @ 2021-02-25 14:34 ForMei 阅读(99) 评论(0) 推荐(0) 编辑
摘要:##因为依赖可能不在中央仓库,导致你配置的maven仓库没有需要的依赖,最好的办法就是去下面这个网址看一下 https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper-spring-boot-starter/1.2.13 阅读全文 »
posted @ 2021-02-21 09:11 ForMei 阅读(357) 评论(0) 推荐(0) 编辑
摘要:##代码已经编译成功,大家放心看 import java.util.Arrays; import java.util.Random; public class quickSort { public static void main(String[] args) { int[] arr={5,4,3, 阅读全文 »
posted @ 2021-02-19 23:38 ForMei 阅读(51) 评论(0) 推荐(0) 编辑
摘要:##最近正在准备面试,复习到排序算法,堆排序也是比较常见的面试题了。 import java.util.Arrays; public class heapSort { public static void main(String []args){ int []arr = {9,8,7,6,5,4}; 阅读全文 »
posted @ 2021-02-19 23:11 ForMei 阅读(53) 评论(0) 推荐(0) 编辑
摘要:##遇到这种情况直接快捷建 :ctrl+alter+shift+s 快捷键打开项目配置,右键选中项目,点击source [ ]() 阅读全文 »
posted @ 2021-02-19 11:01 ForMei 阅读(184) 评论(0) 推荐(0) 编辑
摘要:一个整型数组 nums 里除两个数字之外,其他数字都出现了两次。请写程序找出这两个只出现一次的数字。要求时间复杂度是O(n),空间复杂度是O(1)。 示例 1: 输入:nums = [4,1,4,6] 输出:[1,6] 或 [6,1] 示例 2: 输入:nums = [1,2,10,4,1,4,3, 阅读全文 »
posted @ 2021-02-18 20:37 ForMei 阅读(26) 评论(0) 推荐(0) 编辑
摘要:1.输入一个整型数组,数组中的一个或连续多个整数组成一个子数组。求所有子数组的和的最大值。 要求时间复杂度为O(n)。 输入: nums = [-2,1,-3,4,-1,2,1,-5,4] 输出: 6 解释: 连续子数组 [4,-1,2,1] 的和最大,为 6。 提示: 1 ⇐ arr.length 阅读全文 »
posted @ 2021-02-18 15:03 ForMei 阅读(21) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示