我周围的人几乎都认为二分查找很简单,但事实真的如此吗?二分查找真的很简单吗?并不简单。看看 Knuth 大佬(发明 KMP 算法的那位)怎么说的: Although the basic idea of binary search is comparatively straightforward, t ...
分类:
编程语言 时间:
2019-06-25 13:36:34
阅读次数:
118
binlog(The Binary Log)用于记录用户对数据库更新的SQL语句信息,例如数据库的增删改语句都会记录到binlog里,不会记录查询语句。默认情况下,binlog日志是二进制格式的,不能使用查看文本工具的命令(比如,cat,vi等)查看,而使用mysqlbinlog解析查看。mysql ...
分类:
数据库 时间:
2019-06-25 11:39:45
阅读次数:
131
题目链接 : https://leetcode cn.com/problems/recover binary search tree/ 题目描述: 二叉搜索树中的两个节点被错误地交换。 请在不改变其结构的情况下,恢复这棵树。 示例: 示例 1: 示例 2: 进阶: 使用 O(n) 空间复杂度的解法很 ...
分类:
其他好文 时间:
2019-06-25 10:01:31
阅读次数:
113
Given a binary tree, determine if it is a valid binary search tree (BST). ...
分类:
其他好文 时间:
2019-06-24 22:42:18
阅读次数:
188
Source: PAT A1066 Root of AVL Tree (25 分) Description: An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two chil ...
分类:
其他好文 时间:
2019-06-24 16:24:26
阅读次数:
91
problem 617. Merge Two Binary Trees 参考 1. Leetcode_easy_617. Merge Two Binary Trees; 完 完 ...
分类:
其他好文 时间:
2019-06-24 12:25:05
阅读次数:
72
`二叉查找树(Binary Search Tree) BST`,必须具有以下性质: 若任意节点的左子树不空,则左子树上所有节点的值均 它的根结点的值 若任意节点的右子树不空,则右子树上所有节点的值均 它的根结点的值 任意节点的左、右子树也分别为二叉查找树 没有键值相等的节点 在二叉查找树中查找节点时 ...
分类:
编程语言 时间:
2019-06-23 18:59:09
阅读次数:
106
原题链接在这里:https://leetcode.com/problems/flip-equivalent-binary-trees/ 题目: For a binary tree T, we can define a flip operation as follows: choose any nod ...
分类:
其他好文 时间:
2019-06-23 15:52:29
阅读次数:
121
问题描述: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root) ...
分类:
编程语言 时间:
2019-06-23 15:34:57
阅读次数:
95
https://leetcode.com/problems/find-in-mountain-array/ 题意:给定一个MountainArray(定义见题目),找到其中最早出现的target值的下标。 MountainArray.get() 函数调用不能超过100次。 解法:首先使用Binary ...
分类:
其他好文 时间:
2019-06-23 12:51:55
阅读次数:
99