剑指 Offer 32 - II. 从上到下打印二叉树 II class Solution { public List<List<Integer>> levelOrder(TreeNode root) { Queue<TreeNode>...
剑指 Offer 32 - II. 从上到下打印二叉树 II class Solution { public List<List<Integer>> levelOrder(TreeNode root) { Queue<TreeNode>...
剑指 Offer 32 - III. 从上到下打印二叉树 III /** * Definition for a binary tree node. * public class TreeNode { * int val; *...
找出数组 arr 中重复出现过的元素(不用考虑返回顺序) 示例1 输入 [1, 2, 4, 4, 3, 3, 1, 5, 3] 输出 [1, 3, 4] 将传入的数组arr中的每一个元素value当作另外一个新数组b的key,然后遍历arr...