- 博客(2)
- 收藏
- 关注
原创 剑指offer搜索与回溯算法题解
剑指32.从上到下打印二叉树 class Solution { public int[] levelOrder(TreeNode root) { if (root == null) return new int[0]; ArrayList<Integer> ans = new ArrayList<>(); Queue<TreeNode> queue = new LinkedList<>(); ...
2021-09-14 19:44:56 74
原创 力扣递归回溯题解
78.子集 class Solution { List<List<Integer>> res = new ArrayList<>(); LinkedList<Integer> path = new LinkedList<>(); public List<List<Integer>> subsets(int[] nums) { if(nums.length == 0){ ...
2021-08-26 19:37:35 168
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人