Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, ...
分类:
其他好文 时间:
2018-11-07 14:04:34
阅读次数:
200
mysql主从同步原理: (1) master将改变记录到二进制日志(binary log)中(这些记录叫做二进制日志事件,binary log events),然后通知存储引擎(I/O thread)提交事务; (2) slave将master的binary log events拷贝到它的中继日志 ...
分类:
数据库 时间:
2018-11-07 12:31:54
阅读次数:
302
二叉树查找效率很高,但是它有一个缺点。类似下面一棵树,查找效率是线性的: 定义 于是,引出了平衡二叉树(Self-balancing binary search tree),也叫 BTree(balance tree),AVLTree 它是一 棵空树或它的左右两个子树的高度差的绝对值不超过1,并且左 ...
分类:
其他好文 时间:
2018-11-06 23:31:03
阅读次数:
197
Given the root node of a binary search tree (BST) and a value to be inserted into the tree, insert the value into the BST. Return the root node of the ...
分类:
其他好文 时间:
2018-11-06 13:31:55
阅读次数:
130
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example: Input: [ ["1","0","1","... ...
分类:
其他好文 时间:
2018-11-06 13:25:38
阅读次数:
170
一、ab压力测试方式为: $ab -n 1000 -c 100 http://www.abc.com:80/ 二、直接简单的方法限制同一个IP的并发最大为10:(以宝塔管理工具为例) 1、打开Nginx服务器的管理添加:limit_conn_zone $binary_remote_addr zone ...
分类:
其他好文 时间:
2018-11-06 13:24:10
阅读次数:
163
Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th ...
分类:
编程语言 时间:
2018-11-06 11:20:10
阅读次数:
137
https://leetcode.com/problems/minimum-height-trees/discuss/76055/Share-some-thoughts For a undirected graph with tree characteristics, we can choose a... ...
分类:
其他好文 时间:
2018-11-06 11:09:40
阅读次数:
116
Given a complete binary tree, count the number of nodes. Note: Definition of a complete binary tree from Wikipedia: In a complete binary tree every le ...
分类:
其他好文 时间:
2018-11-05 16:20:47
阅读次数:
83
题意:前序遍历二叉树 前序遍历 根->左子树->右子树 先递归解法: 非递归方法: 在了解非递归之前,我们先了解一下递归在计算机中是怎样实现的。 递归,说白了就是将函数指针放入栈中!然后根据先进后出的原则进行递归! 其实非递归方法就是在模拟递归方法!想一下!如何将遍历到左子树之后又如何遍历到右子树呢 ...
分类:
其他好文 时间:
2018-11-04 19:45:16
阅读次数:
120