二叉樹--最小路徑

最小路徑 二叉樹中的最小路徑指的是,二叉樹中根節點到達葉子節點的路徑中,距離最短的一個。web //recursively public int minDepth1(TreeNode root) { if (root == null) { return 0; } else if (root.left != null && root.right != null) {
相關文章
相關標籤/搜索