题目:Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representa...
分类:
其他好文 时间:
2016-01-04 08:55:51
阅读次数:
208
题目:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total n...
分类:
其他好文 时间:
2016-01-04 08:52:28
阅读次数:
172
原创文章,转载请注明来自钢铁侠Mac博客http://www.cnblogs.com/gangtiexia折半插入排序(Binary Insertion Sort)的基本思想是将新记录插入到已经排好序的有序表中,初始有序表只有无序表的第一个数据,依次对无序表每个数据进行折半插入排序,从而得到了有序表...
分类:
编程语言 时间:
2016-01-03 22:34:09
阅读次数:
273
1.Given an array where elements are sorted in ascending order, convert it to a height balanced BST.2.Given a singly linked list where elements are sor...
分类:
其他好文 时间:
2016-01-03 20:58:24
阅读次数:
106
https://leetcode.com/problems/search-for-a-range/Given a sorted array of integers, find the starting and ending position of a given target value.Your ...
分类:
其他好文 时间:
2016-01-03 20:49:48
阅读次数:
116
题目:Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.思路:类似于上一篇文章中的方法一,对每列的左右拓展极限进行记...
分类:
其他好文 时间:
2016-01-03 18:20:50
阅读次数:
110
l 安装配置:略l 机器分布IP作用用途192.168.15.3master主库192.168.15.4Slave1备库192.168.15.5Slave2备库l 基本的MySQL主从配置MySQL复制过程分成三步:master将改变记录到二进制日志(binary log)。这些记录过程叫做二进制日...
分类:
数据库 时间:
2016-01-03 17:14:08
阅读次数:
244
bc是Binary Calculator的缩写。bc*函数的參数都是操作数加上一个可选的 [int scale],比方string bcadd(string $left_operand, string $right_operand[, int $scale]),假设scale没有提供,就用bcsca...
分类:
Web程序 时间:
2016-01-03 09:17:16
阅读次数:
206
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 3...
分类:
其他好文 时间:
2016-01-02 18:37:29
阅读次数:
173
Linux 各目录的作用:/binbin是binary的缩写。这个目录沿袭了UNIX系统的结构,存放着使用者最经常使用的命令。例如cp、ls、cat,等等。/boot这里存放的是启动Linux时使用的一些核心文件。/devdev是device(设备)的缩写。这个目录下是所有Linux的外部设备,.....
分类:
系统相关 时间:
2016-01-02 18:31:03
阅读次数:
187