自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (1)
  • 收藏
  • 关注

原创 [leetcode]Maximum Product Subarray最大子序列乘积

class Solution {public: int maxProduct(int A[], int n) { if(n==1) return A[0]; int ptable[n], ntable[n]; memset(ptable, 0, sizeof(ptable)); memset(ntable, 0, sizeo

2014-10-09 19:52:27 484

原创 一道亚马逊笔试题:给定钱买最少的商品

大意就是,有N个不同价值的商品,给你M块钱,怎样正好把钱花完然后买的商品数量最少?解法一:iterative deepening search 先看一个商品可不可以花完,做一个深度优先搜索,再看两个商品,再看三个。。。。效率最低的方法bool dfs(int n, int* A, int cur, int b, const vector& goods) { if(cur

2013-10-24 20:40:10 1723

原创 Two's complement

I have learned two's complement in the computer organization course. At that time, I simply knew that to express a negative number, first find it's positive form, then flip every bit of it and finally

2012-06-07 10:45:26 551

原创 Three Algorithms for Fibonacci

1. exponential algorithm: fib1(n) = fib1 (n-1) + fib1(n-2). running time: O(1.6n)2. polynomial algorithm: which is also linear programming, running time  O(n2)3. using matrix multiplication:  assu

2012-06-04 23:12:19 387

原创 微软面试经历

从微软两轮面试归来,只感到身心疲惫。尽力了,一切只是看天意了。其实在收到面试邀请的时候,我以为这种面试就像是平时在校园里随处可见的小面试一样,随随便便聊几句,说说情况就过去了。没想到这种大公司,尤其是世界级别的公司的面试,果然是真枪实战,能进去的非等闲之辈。也对,如果一个公司随随便便就能进的话,那他也离倒闭不远了。所以说当我知道这个面试要进行两个小时三轮的时候,着实慌了。但是慌也没有用,解

2012-04-12 23:11:41 545

原创 Git学习笔记-Git Branching

1.Branch is just a pointer called HEAD which points to the current snapshot.2.Create a new branch:git branch [branch-name].3.Switching to an existing branch:git checkout [new branch].4.Merge bra

2012-02-23 19:52:14 424

原创 Git学习笔记-Basic Git

1.Three main sections of Git: the git directory, the working directory, and the staging area.Git directory: where git stores the metadata and object database (most important).Working directory: a

2012-02-11 14:51:10 579

HTML5-step by step

Microsoft出版的经典step by step系列的html5版,定价39.99美元。 超清晰的pdf原版,绝非扫描版。2011新书。

2011-10-03

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除