原题链接在这里:https://leetcode.com/problems/set-matrix-zeroes/最原始的想法就是复制一个matrix, 扫描复制的matrix, 若遇到0, 更改原来的matrix, 如此使用O(m*n) space.观察到判断一个数是否应该更改为0 只需要看它的同行...
分类:
其他好文 时间:
2015-10-11 09:04:06
阅读次数:
158
Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.The input string does not contain lead...
分类:
其他好文 时间:
2015-10-11 06:46:14
阅读次数:
186
用过autolayout的对pin都应该不陌生,通过这个选项可以设置控件的四周的外边距:Top Space、Leading Space、Trailing Space、Bottom Space。在Xcode6的时代,你可以有2种选择来使用pin:1)通过菜单项:Editor->pin2)通过设计器下方...
分类:
其他好文 时间:
2015-10-10 17:04:31
阅读次数:
233
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2015-10-09 22:59:57
阅读次数:
198
1.press Ctrl+Space to activate content assist2.press Ctrl+1 to showa selection dialog with possible corrections3.代码折叠的快捷键:Ctrl+Shift+Numpad_Divede(小键盘...
分类:
系统相关 时间:
2015-10-09 22:57:15
阅读次数:
178
前提环境光(ambient occlusion)是一种GI,其简化形式SSAO可以用“微量高效”来形容,消耗得很少,得到的效果很好。环境光遮蔽(ambient occlusion)的本质是计算在一个点的半球面范围内有多少方向被阻塞(如下图1.2.1),然后根据它调整表面颜色。如果实时渲染使用的话非常...
分类:
编程语言 时间:
2015-10-09 12:08:41
阅读次数:
284
1. Ctrl + Space完成类、方法、变量名称的自动输入2. Ctrl + N(Ctrl + Shift + N)跳转到指定的java文件(其它文件)3. Ctrl + B跳转到定义处4. Ctrl + Alt + T用if、while、try catch来围绕选中的代码行5. Ctrl + ...
分类:
其他好文 时间:
2015-10-09 11:42:04
阅读次数:
163
“p” command prints the buffer (remember to use -n option with “p”)“d” command is just opposite, its for deletion. ‘d’ will delete the pattern space bu...
分类:
其他好文 时间:
2015-10-08 23:05:13
阅读次数:
256
刚刚在stackoverflow上看到一个关于android LinearLayout的weight属性的解释,觉得解释很透彻,帖过来和大家分享一下。 In a nutshell,?layout_weight?specifies how much of the extra space in the layout t...
分类:
其他好文 时间:
2015-10-08 10:40:54
阅读次数:
228
Question:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last...
分类:
其他好文 时间:
2015-10-07 20:24:04
阅读次数:
169