Definition: see
wikihttp://en.wikipedia.org/wiki/Binary_search_tree 1 /* 2 This look up is a
fast operation because you eliminate the half 3 t...
分类:
其他好文 时间:
2014-07-22 23:06:34
阅读次数:
330
这道题我一开始想到用递归方法,可以把规模大的问题变成规模小的问题,但是觉得递归的时间复杂度很高,因为它会把相同的问题进行重复计算,然后我想是不是有什么down-up的方法,先把所有的子问题的结果保存起来,但是发现问题的最优解并不能由子问题的最优解推导出来。最后就想到买股票的时候,我们在一个局部极小的...
分类:
其他好文 时间:
2014-05-01 19:24:02
阅读次数:
250
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up:
Could you do this in-place?
刚开始没有思路,但是自己举了几个简单的栗子才看出规律:需要一圈儿一圈儿的变换位置。有两层for循环:外...
分类:
其他好文 时间:
2014-05-01 18:33:34
阅读次数:
359
It is the first time that I use heroku. But I
encountered some problems installing it. Luckily, I resolved the problem.(In
windows 8)Step 1: Sign up.....
分类:
其他好文 时间:
2014-05-01 12:32:50
阅读次数:
317
Given an array of integers, find two numbers
such that they add up to a specific target number.The function twoSum should
return indices of the two nu...
分类:
其他好文 时间:
2014-05-01 08:35:40
阅读次数:
443
组合数学、-排列组合数----sum求sum=sum*(m--)/i;int c(int
n,int m)//n下标,m上标{ int sum=1; for(int i=1;in-m) m=n-m; int temp=n; for(int
i=1;i1) { up[j]/=temp; d...
分类:
其他好文 时间:
2014-05-01 01:07:44
阅读次数:
409
Background:
It's fairly common for businesses to want to provide some high availability for their SQL Server databases, and one option is to have two SQL Server databases on separate machines with a SQL Server database mirrored....
分类:
数据库 时间:
2014-04-30 22:11:38
阅读次数:
520
懂放弃,学会放弃,但不要轻言放弃。我们要学会知道:放弃是一种艺术!...
分类:
其他好文 时间:
2014-04-29 13:42:21
阅读次数:
253
The blonde Angela has a new whim: internet chats. Of course, as any blonde, she writes her messages using the upper case. You are the moderator of Angela's favorite chat and you're fed up with her upp...
分类:
其他好文 时间:
2014-04-29 13:17:21
阅读次数:
293