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...
分类:
其他好文 时间:
2015-02-09 15:32:58
阅读次数:
146
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:
其他好文 时间:
2015-02-09 14:04:10
阅读次数:
148
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.Follow up:Did you use extra space?A straight forward solution using O(mn) space is probably a bad idea.A si...
分类:
其他好文 时间:
2015-02-09 12:53:24
阅读次数:
217
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2015-02-09 09:23:32
阅读次数:
176
Total Accepted: 421
Total Submissions: 1404
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 conta...
分类:
其他好文 时间:
2015-02-09 08:13:35
阅读次数:
117
Sort a linked list inO(nlogn) time using constant space complexity./** * Definition for singly-linked list. * struct ListNode { * int val; * L...
分类:
其他好文 时间:
2015-02-09 02:01:37
阅读次数:
212
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ...
分类:
其他好文 时间:
2015-02-09 00:32:20
阅读次数:
257
原文网址:http://blog.chinaunix.net/uid-25909722-id-2912890.html转自:http://blog.chinaunix.net/space.php?uid=7589639&do=blog&id=2897930linux下a.out > outfile ...
分类:
系统相关 时间:
2015-02-08 20:43:35
阅读次数:
233
MySQL 常用数据库mode组合后的模式名称组合模式中的各个sql_modeDB2PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FILED_OPTIONSMAXDB PIPES...
分类:
数据库 时间:
2015-02-08 15:22:51
阅读次数:
306
CSS控制文本超出指定宽度后用省略号代替,CSS控制文本不换行。一般的文字截断(适用于内联与块):.text-overflow { display:block;/*内联对象需加*/ width:31em; word-break:keep-all;/* 不换行 */ white-space:nowra...
分类:
Web程序 时间:
2015-02-08 15:14:48
阅读次数:
157