首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
leetcode.2583专题
LeetCode.2583. 二叉树中的第 K 大层和
题目 2583. 二叉树中的第 K 大层和 分析 这道题其实考察的是二叉树的层序遍历,下面我介绍一个二叉树的层序遍历模版: public List<List<Integer>> levelOrder(TreeNode root) {// 记录最终的结果List<List<Integer>> res = new ArrayList<>();if(root == null) retu
阅读更多...