Four front pockets, two outside and two interior that offers ample space for storing small accessories such as mobile phone, iPod, wallet and keys. Li...
分类:
其他好文 时间:
2014-07-16 22:57:33
阅读次数:
180
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2014-07-16 21:00:49
阅读次数:
208
1. 1 #include 2 3 #define SPACE ' ' 4 #define NEWLINE '\n' 5 6 int main() 7 { 8 int spaces,newlines,others; 9 char ch;10 spaces = newli...
分类:
其他好文 时间:
2014-07-16 20:18:33
阅读次数:
139
glm::mat4 View = glm::lookAt( glm::vec3(4,3,3), // Camera is at (4,3,3), in World Space glm::vec3(0,0,0), // and looks at the origin gl...
分类:
其他好文 时间:
2014-07-16 19:34:31
阅读次数:
588
Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only O(k) extra space?
原题链接:https:/...
分类:
其他好文 时间:
2014-07-12 20:43:11
阅读次数:
213
Linux中thread (light-weighted process) 跟process在實作上幾乎一樣。最大的差異來自於,thread 會分享 virtual memory address space.a. 從kernel角度看兩者沒差別,在user看來process是least shared...
分类:
系统相关 时间:
2014-07-11 20:41:54
阅读次数:
308
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
For example, given
s = "leetcode",
dict = ["leet"...
分类:
其他好文 时间:
2014-07-10 20:57:26
阅读次数:
215
编码规范要求不允许使用tab,但是又要有4个字符的缩进,连点4次space,这不是程序员的风格
来看看 eclipse 设置一次tab像space的转换
如下操作
Window->Preferences 基于K&R clone一个新的代码风格
更改缩进风格 缩进大小为4,即4个字符,OK完成了...
分类:
系统相关 时间:
2014-07-10 20:38:42
阅读次数:
303
题目:Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or eq...
分类:
其他好文 时间:
2014-07-10 14:41:23
阅读次数:
177
在堆排序之前我们要先知道一个非常基础的一个东西就是arr.heap-size。我刚开始看的时候,对这个不怎么重视,觉得,它不就是等于arr.length吗?并且在学习之初的建堆上,也没有多大的用处,但是在后面的排序中,优化性能方面它发挥了很大的作用。它的定义说白了就是在一个数组arr中有效的元素个数...
分类:
其他好文 时间:
2014-07-08 22:04:15
阅读次数:
208