码迷,mamicode.com
首页 >  
搜索关键字:recover binary searc    ( 12422个结果
111. 二叉树的最小深度
111. 二叉树的最小深度 给定一个二叉树,找出其最小深度。 最小深度是从根节点到最近叶子节点的最短路径上的节点数量。 说明: 叶子节点是指没有子节点的节点。 示例: 给定二叉树 [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15 7 /** * Definitio ...
分类:其他好文   时间:2020-04-12 18:45:50    阅读次数:57
leetcode 144 二叉树的前序遍历
地址:https://leetcode cn.com/problems/binary tree preorder traversal/submissions/ 大意:前序遍历一棵树 ` ` ...
分类:其他好文   时间:2020-04-12 18:34:41    阅读次数:64
235. 二叉搜索树的最近公共祖先
1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x), ...
分类:其他好文   时间:2020-04-12 18:30:30    阅读次数:65
记录iOS踩的一些坑
1. 编译报错,提示不支持 解决思路一: 排查一些库文件或者代码文件有没有导入,一般为依赖文件找不到导致报错, Build Phases complite sources 或者 link binary with libraries ,未添加的文件加进去,如果还是不行再试试其他问题 ...
分类:移动开发   时间:2020-04-12 10:57:05    阅读次数:85
[刷题] 257 Binary Tree Paths
要求 给定一棵二叉树,返回所有表示从根节点到叶子节点路径的字符串 思路 递归地返回左右子树到叶子节点的字符串 示例 1 class Solution { 2 public: 3 vector<string> binaryTreePaths(TreeNode* root) { 4 5 vector<s ...
分类:其他好文   时间:2020-04-12 10:44:25    阅读次数:60
【剑指offer】【树】54.二叉搜索树的第k大节点
二叉搜索树的第k大节点 递归法 中序遍历的二叉搜索树序列为单调递增的序列,将中序遍历的结果放到vector中,第k大的数为v.size() k位置的数 迭代法 ...
分类:其他好文   时间:2020-04-12 00:02:47    阅读次数:91
94. 二叉树的中序遍历
94. 二叉树的中序遍历 给定一个二叉树,返回它的中序 遍历。 示例: 输入: [1,null,2,3] 1 \ 2 / 3 输出: [1,3,2] /** * Definition for a binary tree node. * public class TreeNode { * int va ...
分类:其他好文   时间:2020-04-11 23:54:51    阅读次数:73
226. 翻转二叉树
1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x), ...
分类:其他好文   时间:2020-04-11 20:36:05    阅读次数:66
go基础-变量
```go package main /** Constants: true false iota nil Types: int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr float32 float64 comple... ...
分类:其他好文   时间:2020-04-11 20:23:03    阅读次数:59
222. 完全二叉树的节点个数
1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x), ...
分类:其他好文   时间:2020-04-11 18:56:31    阅读次数:87
12422条   上一页 1 ... 61 62 63 64 65 ... 1243 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!