题目: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, there are a total of 5 unique
分类:
其他好文 时间:
2016-01-27 19:39:54
阅读次数:
127
使用Sublime_text_3,并安装了Emment插件,结果使用的时候报了please wait a bit while pyV8 binary is being downloaded,查找了一些资料,结果发现是PyV8的问题。去gihub下载 PyV8,连接地址:https://github....
分类:
其他好文 时间:
2016-01-27 12:54:23
阅读次数:
593
Use DP to generate unique distinct binary trees;Create to two integer value, one "start" to represent the lowest value, and the other "end" to represe...
分类:
其他好文 时间:
2016-01-27 10:45:04
阅读次数:
204
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:
其他好文 时间:
2016-01-27 07:09:04
阅读次数:
178
Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:
其他好文 时间:
2016-01-27 07:08:43
阅读次数:
189
grep使用:1.参数说明-a:将binary文件以text文件的方式搜寻数据-c:计算找到‘字符串‘的次数-i:忽略大小写的不同-n:顺便输出行号-v:反向选择,亦即显示出没有‘字符串‘内容的那一行!--color=auto:关键词部分加上颜色2.查出/etc/passwd里包含root的行方式1greproot/etc/pass..
分类:
其他好文 时间:
2016-01-26 09:18:49
阅读次数:
192
题目描述:Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{...
分类:
编程语言 时间:
2016-01-26 00:17:06
阅读次数:
201
190. Reverse BitsReverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 000000101001010000011110...
分类:
其他好文 时间:
2016-01-25 16:36:52
阅读次数:
141
1 mysq error日志报错例如以下:2014-05-12 11:29:54 22977 [ERROR] Slave SQL: The incident LOST_EVENTS occured on the master. Message: error writing to the binary...
分类:
其他好文 时间:
2016-01-25 16:30:38
阅读次数:
128
对于一个合法的十进制数,它的所有后缀也是合法的。于是按位BFS,保留前导零,每次往前添加一个$0$或者$1$,直到找到第$n$个不含前导零的合法数为止即可。时间复杂度$O(nl)$。#include#define N 400struct Num{ int len,v[N]; Num(){for(.....
分类:
其他好文 时间:
2016-01-25 01:28:04
阅读次数:
308