Given an array where elements are sorted in
ascending order, convert it to a height balanced BST./** * Definition for binary
tree * public class TreeN...
分类:
其他好文 时间:
2014-06-11 21:58:10
阅读次数:
300
原题地址:https://oj.leetcode.com/problems/search-insert-position/题意:Given
a sorted array and a target value, return the index if the target is found. If
n...
分类:
编程语言 时间:
2014-06-11 11:28:40
阅读次数:
349
原题地址:https://oj.leetcode.com/problems/plus-one/题意:Given
a non-negative number represented as an array of digits, plus one to the
number.The digits are...
分类:
编程语言 时间:
2014-06-11 11:25:27
阅读次数:
304
又2b了一次…… 1 var s:ansistring; 2
ans,pre:array[0..10000] of longint; 3 i,k,tot:longint; 4 procedure main; 5 begin
6 pre[1]:=0;k:=0; 7 for i:=...
分类:
其他好文 时间:
2014-06-11 08:42:01
阅读次数:
211
脑残wa了一次 1 var s:ansistring; 2
ans,i,k,m:longint; 3 pre:array[0..1010000] of longint; 4 function
max(x,y:longint):longint; 5 begin 6 if x>...
分类:
其他好文 时间:
2014-06-11 08:30:14
阅读次数:
179
The paper "Optimal Decoding of Linear Codes for
Minimizing Symbol Error Rate", which is the source of the BCJR decoding
algorithm, is my current obje....
分类:
其他好文 时间:
2014-06-11 07:35:20
阅读次数:
250
近来一直利用业余时间在看jquery2.1.1源码,大约看了两千行了。平时看的时候,做了一些笔记,贴出来分享。1.Array.prototype.slice.call
可以将伪数组转化为真正的数组其实,这里所谓的“伪数组”就是有length属性,并且有“0”、“1”、“2”等这些属性的对象,如下代码...
分类:
Web程序 时间:
2014-06-11 07:29:13
阅读次数:
334
其实这题一看知道应该是DP,再一看数据范围肯定就是单调队列了。不过我还不太懂神马单调队列、斜率优化……附上天牛的题解:http://www.cnblogs.com/neverforget/archive/2012/04/19/2456483.html
1 var f,g:array[0..10000...
Given an array withnobjects colored red, white
or blue, sort them so that objects of the same color are adjacent, with the
colors in the order red, wh...
分类:
其他好文 时间:
2014-06-07 20:11:53
阅读次数:
234
Given a non-negative number represented as an
array of digits, plus one to the number.The digits are stored such that the most
significant digit is at...
分类:
其他好文 时间:
2014-06-07 16:56:28
阅读次数:
188