码迷,mamicode.com
首页 >  
搜索关键字:to the gcc binary    ( 19550个结果
LeetCode124二叉树中的最大路径和
题目链接 https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/ 题解 递归解法 路径:一条从树中任意节点出发,达到任意节点的序列。该路径至少包含一个节点,且不一定经过根节点。 这道题和LeetCode687最长同值路径和Leet ...
分类:其他好文   时间:2020-07-27 23:35:37    阅读次数:74
[LeetCode 1530] Number of Good Leaf Nodes Pairs
Given the root of a binary tree and an integer distance. A pair of two different leaf nodes of a binary tree is said to be good if the length of the s ...
分类:其他好文   时间:2020-07-27 15:58:17    阅读次数:93
安装 canvas、node-sass 报错或者警告 node-pre-gyp WARN
解决办法 在项目内添加一个 .npmrc 文件: 代码 //sass sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomj ...
分类:其他好文   时间:2020-07-27 15:51:45    阅读次数:89
leetcode-98-验证二叉搜索树
思路: 1.使用DFS遍历整颗树 2.二叉树的根节点的范围为INT_MIN,INT_MAX. 3.对于当前节点判断是否合法,合法条件:先遍历左子树的最大值是否小于当前节点的值,在遍历右子树,右子树的最小值是否大于当前节点的值 注意: 根节点的边界为 INT_MIN,INT_MAX 左子树的范围:lo ...
分类:其他好文   时间:2020-07-27 13:53:58    阅读次数:61
Acwing 1291.轻拍牛头
题意: 给定一个序列ai,问序列中其他数中有多少个数是它的约数 思路: 暴力求法会超时。O(n²) 最优解:先储存每个数的个数,遍历x,每个x的倍数加上x的个数 注:最后每个数的答案要-1(减去本身) Code: #pragma GCC optimize(3) #pragma GCC optimiz ...
分类:Windows程序   时间:2020-07-27 13:36:55    阅读次数:80
二叉排序树
二叉排序树 二叉排序树:BST: (Binary Sort(Search) Tree), 对于二叉排序树的任何一个非叶子节点,要求左子节点的值比当前节点的值小,右子节点的值比当前节点的值大。 二叉排序树创建和遍历 ? 一个数组创建成对应的二叉排序树,并使用中序遍历二叉排序树 使用中序遍历的二叉树结点 ...
分类:编程语言   时间:2020-07-27 09:35:38    阅读次数:81
Ubuntu 20.04 Install Guest Additions for VirtualBox
Ubuntu 20.04 Install Guest Additions for VirtualBox时有报错: This system is currently not set up to build kernel modules.Please install the gcc make perl ...
分类:系统相关   时间:2020-07-26 23:00:43    阅读次数:94
LeetCode111二叉树的最小深度
题目链接 https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/ 题解一 递归解法 我写的 说明详见注释 // Problem: LeetCode 111 // URL: https://leetcode-cn.com/probl ...
分类:其他好文   时间:2020-07-26 19:32:58    阅读次数:60
深入浅出SOA(Service Oriented Architecture)
介绍 在前面的文章中我写了篇关于Web Services的,其实本人对这分布式领域是十分感兴趣的,今天,我将概要地写个关于SOA(面向服务的架构)的文章,文章可能不是很细,但是比较适合作为入门的学习资料,希望大家能喜欢。下面我将逐节进行SOA的介绍。 什么是SOA? SOA的全称是Service O ...
分类:其他好文   时间:2020-07-26 19:09:59    阅读次数:110
leetcode-----111. 二叉树的最小深度
链接:https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNod ...
分类:其他好文   时间:2020-07-26 19:03:29    阅读次数:62
19550条   上一页 1 ... 39 40 41 42 43 ... 1955 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!