码迷,mamicode.com
首页 >  
搜索关键字:depth    ( 1433个结果
865. Smallest Subtree with all the Deepest Nodes
Given a binary tree rooted at root, the depth of each node is the shortest distance to the root. A node is deepest if it has the largest depth possibl ...
分类:其他好文   时间:2020-02-06 11:07:31    阅读次数:74
Git 常用资源
库管理 克隆库 git clone https://github.com/php/php-src.gitgit clone --depth=1 https://github.com/php/php-src.git # 只抓取最近的一次 commit 历史管理 查看历史 git log --prett... ...
分类:其他好文   时间:2020-02-05 10:21:41    阅读次数:71
【单词方阵】蒟蒻题解
题目: "传送门" 题外闲话 这道题是一个$DFS$(深度优先搜索 $Depth$ $Frist$ $Sreach$)的题目,可是…我就是不想敲递归(~~我绝对不会告诉你我是想偷懒的~~),于是就有了这个程序和这篇题解…… 题目分析 首先,这是一个二维的题目,要寻找8个方向,如下图所示: | ( 1 ...
分类:其他好文   时间:2020-02-03 13:39:17    阅读次数:50
leetcode104 Maximum Depth of Binary Tree
1 """ 2 Given a binary tree, find its maximum depth. 3 The maximum depth is the number of nodes along the longest path from the root node down to the ...
分类:其他好文   时间:2020-02-02 23:16:12    阅读次数:93
LeetCode——199. 二叉树的右视图
给定一棵二叉树,想象自己站在它的右侧,按照从顶部到底部的顺序,返回从右侧所能看到的节点值。 Python class Solution(object): def rightSideView(self, root): rightmost_value_at_depth = dict() depth no ...
分类:其他好文   时间:2020-02-02 13:29:25    阅读次数:74
LeetCode 111. Minimum Depth of Binary Tree
111. Minimum Depth of Binary Tree(二叉树的最小深度) 链接 https://leetcode cn.com/problems/minimum depth of binary tree/ 题目 给定一个二叉树,找出其最小深度。 最小深度是从根节点到最近叶子节点的最短路 ...
分类:其他好文   时间:2020-01-30 21:23:30    阅读次数:55
LeetCode 104. Maximum Depth of Binary Tree
104. Maximum Depth of Binary Tree(二叉树的最大深度) 链接 https://leetcode cn.com/problems/maximum depth of binary tree 题目 给定一个二叉树,找出其最大深度。 二叉树的深度为根节点到最远叶子节点的最长路 ...
分类:其他好文   时间:2020-01-30 21:16:36    阅读次数:52
损失函数——均方误差和交叉熵
1.MSE(均方误差) MSE是指真实值与预测值(估计值)差平方的期望,计算公式如下: MSE = 1/m (Σ(ym-y'm)2),所得结果越大,表明预测效果越差,即y和y'相差越大 y = tf.constant([1,2,3,0,2]) y = tf.one_hot(y,depth=4) y ...
分类:其他好文   时间:2020-01-27 15:40:00    阅读次数:100
Linux查看个目录大小
https://www.runoob.com/linux/linux-filesystem.html du -sh * du -sh /app/* du -h --max-depth=1 . ...
分类:系统相关   时间:2020-01-26 10:17:58    阅读次数:67
剑指OFFER 二叉树的深度
剑指OFFER 二叉树的深度 这道题用深搜或者宽搜都可以完成,这里我就直接用深搜了. 思路 代码上让depth每进一个左孩子/右孩子便使深度+1,离开的时候再深度 1来保证depth记录当前深度. 得到depth实时记录当前遍历到结点的深度后,设置一个max_depth保留最大的深度值. 代码 ...
分类:其他好文   时间:2020-01-25 22:11:00    阅读次数:78
1433条   上一页 1 ... 16 17 18 19 20 ... 144 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!