GoAlgo

Leetcode 111 二叉树的最小深度:BFS

sanyinchen

https://leetcode.cn/problems/minimum depth of binary tree/ 一、题目解析 给定一棵二叉树,找出其最小深度。最小深度是从根节点到最近叶子节点的最短路径上的节点数。叶子节点是指没有左子节点和右子节点的节点。 以 [3,9,20,null,null,15,7] 为例…

正在进入完整页面…