Given an array where elements are sorted in ascending order, convert it to a height balanced BST.题目大意:给定一个升序序列的数组,将其转换为二叉搜索树。解题思路:数组中间元素是根元素,根元素将数组划分为...
分类:
其他好文 时间:
2015-04-20 22:39:28
阅读次数:
207
Add BinaryTotal Accepted:39288Total Submissions:158078My SubmissionsQuestionSolutionGiven two binary strings, return their sum (also a binary string)....
分类:
其他好文 时间:
2015-04-20 20:52:08
阅读次数:
200
一:Leetcode 89 Gray Code
题目: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 number of bits in ...
分类:
其他好文 时间:
2015-04-20 17:10:42
阅读次数:
148
时间限制:10000ms
单点时限:1000ms
内存限制:256MB
描述
在上一回和上上回里我们知道Nettle在玩《艦これ》,Nettle在整理好舰队之后终于准备出海捞船和敌军交战了。
在这个游戏里面,海域是N个战略点(编号1..N)组成,如下图所示
其中红色的点表示有敌人驻扎,猫头像的的点表示该地图敌军主力舰队(boss)的驻扎点,虚线表示各个战略点...
分类:
其他好文 时间:
2015-04-20 16:54:16
阅读次数:
358
来源: Backdoor CTF 2015 Little Suzie started learning C. She created a simple program that echo's back whatever you input. Here is the binary file. The ...
分类:
其他好文 时间:
2015-04-20 16:20:20
阅读次数:
318
题目:Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exa...
分类:
其他好文 时间:
2015-04-20 13:12:01
阅读次数:
155
problem:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 ...
分类:
其他好文 时间:
2015-04-20 11:16:24
阅读次数:
209
problem:
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3...
分类:
其他好文 时间:
2015-04-20 11:14:41
阅读次数:
131
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-04-20 11:01:21
阅读次数:
128
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.采用二分递归。 1 class Solution { 2 public: 3 TreeNode *...
分类:
其他好文 时间:
2015-04-19 21:10:54
阅读次数:
173