public class Solution { public String intToRoman(int num) { StringBuffer result = new StringBuffer(); int n=num; // 刚开始写代码的时候写错变量了,不想...
分类:
其他好文 时间:
2014-08-30 17:33:29
阅读次数:
148
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 pretty straight forward. Could you devis...
分类:
其他好文 时间:
2014-08-29 21:28:08
阅读次数:
313
# Definition for singly-linked list.class ListNode: def __init__(self, x): self.val = x self.next = Noneclass Solution: # @return ...
分类:
其他好文 时间:
2014-08-29 19:40:58
阅读次数:
164
class Solution: # @param matrix, a list of lists of integers # RETURN NOTHING, MODIFY matrix IN PLACE. def setZeroes(self, matrix): di...
分类:
其他好文 时间:
2014-08-29 16:00:48
阅读次数:
203
1 class Solution { 2 vector > pos; 3 vector sen; 4 public: 5 6 vector wordBreak(string s, unordered_set &dict) { 7 getVector(s,d...
分类:
其他好文 时间:
2014-08-29 00:03:36
阅读次数:
256
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 ...
分类:
其他好文 时间:
2014-08-28 19:33:55
阅读次数:
266
【题意】
给定一个字符串,把里面的单词逆序输出来。
例如:给定 s = "the sky is blue",返回 "blue is sky the"。
注意:接收的字符串开头和结尾可能有空格,但是返回时开头和结尾不能有空格;返回时每两个单词之间只能有一个空格。
【Java代码】
public class Solution {
public String reverseWords(...
分类:
其他好文 时间:
2014-08-28 18:10:15
阅读次数:
199
SubsetsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must...
分类:
其他好文 时间:
2014-08-28 17:58:05
阅读次数:
356
一、用UltraISO制作U盘启动器,被安装的电脑要设置成从U盘启动。二、傻瓜式安装简体中文版三、安装更新1 sudo apt-get update2 sudo apt-get upgrade四、安装aptitude1 sudo apt-get install aptitude五、删除ibus,安装...
分类:
其他好文 时间:
2014-08-28 14:43:39
阅读次数:
152
Solve all Google Play Store errors1. Fix Google Play error 491Not able to download or Update any application on your Smartphone or tablet.Solution:- R...
分类:
其他好文 时间:
2014-08-28 13:09:29
阅读次数:
305