table中td会随着里面的内容伸缩,设置其width样式并没有效果。这个时候需要下面的CSS可以实现。首先是设置table.table {table-layout:fixed;}其次是td.table td { overflow: hidden; white-space: nowra...
分类:
其他好文 时间:
2014-06-18 18:06:34
阅读次数:
221
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?
思路:最简单的方法就是按...
分类:
其他好文 时间:
2014-06-18 12:40:54
阅读次数:
265
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Could you devise a constant space solution?
思路:因为需要遍历整个矩阵,时间复杂度肯定需要O(m * n),对于空间复杂度而言,第一种是可以使用O(m * n),...
分类:
其他好文 时间:
2014-06-18 12:33:39
阅读次数:
167
强制不换行 div{ white-space:nowrap; } 自动换行 div{ word-wrap: break-word; word-break: normal; } 强制英文单词断行 div{ word-break:break-all; } ========================...
分类:
Web程序 时间:
2014-06-18 10:47:41
阅读次数:
274
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 equal to
m + n) to
hold additional ele...
分类:
其他好文 时间:
2014-06-17 23:05:13
阅读次数:
246
Behavioral things
are the dynamic parts of UML models. These are the verbs of a model, representing behavior over time and space. In all, there are three primary kinds of behavioral things.
行...
分类:
其他好文 时间:
2014-06-17 21:47:37
阅读次数:
315
归并排序(merging Sort) 详解 及 代码本文地址: http://blog.csdn.net/caroline_wendy归并排序(merging sort): 包含2-路归并排序, 把数组拆分成两段, 使用递归, 将两个有序表合成一个新的有序表.归并排序(merge sort)的时间复杂度是O(nlogn), 实际效果不如快速排序(quick sort)和堆排序(heap sort)...
分类:
其他好文 时间:
2014-06-17 16:19:56
阅读次数:
232
题目
Determine whether an integer is a palindrome. Do this without extra space.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of converting the integer to ...
分类:
其他好文 时间:
2014-06-17 16:12:39
阅读次数:
226
八. 流编辑器sed: sed一次处理一行文件并把输出送往屏幕。sed把当前处理的行存储在临时缓冲区中,称为模式空间(pattern space)。一旦sed完成对模式空间中的行的处理,模式空间中的行就被送往屏幕。行被处理完成之后,就被移出模式空间,程序接着读入下一行,处理,显示,移出......文...
分类:
系统相关 时间:
2014-06-17 14:53:13
阅读次数:
316
一下内容转载于:http://blog.chinaunix.net/space.php?uid=22976768&do=blog&id=1640924。这个总结的很好~windows下的TortoiseSVN是资源管理器的一个插件,以覆盖图标表示文件状态,几乎所以命令都有图形界面支持,比较好用,这里...
分类:
系统相关 时间:
2014-06-17 14:04:28
阅读次数:
342