Problem Description:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Solution: ...
分类:
其他好文 时间:
2014-07-07 16:39:19
阅读次数:
163
【为什么要用多线程?】传统的图形用户界面应用程序都仅仅有一个运行线程,而且一次仅仅运行一个操作。假设用户从用户界面中调用一个比較耗时的操作,当该操作正在运行时,用户界面一般会冻结而不再响应。这个问题能够用事件处理和多线程来解决。【Linux有线程的概念吗?】传统的UNIX系统也支持线程的概念,但一个...
分类:
编程语言 时间:
2014-07-07 16:23:40
阅读次数:
183
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-...
分类:
其他好文 时间:
2014-07-07 16:17:00
阅读次数:
139
Source Code for Unity3D Course Example Applications
https://github.com/edagarli/unity3d...
分类:
移动开发 时间:
2014-06-30 09:47:31
阅读次数:
227
【题目】
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", "code"].
Return true because "leetcode" can be segm...
分类:
其他好文 时间:
2014-06-30 09:02:26
阅读次数:
276
题目:
Given numRows, generate the first numRows of Pascal's triangle.
For example, given numRows = 5,
Return
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
分析:打印杨辉三角。numRows...
分类:
其他好文 时间:
2014-06-30 06:25:24
阅读次数:
317
本系列所有文章可以在这里查看http://blog.csdn.net/cloud_castle/article/category/2123873...
分类:
其他好文 时间:
2014-06-30 06:19:15
阅读次数:
437
题目
Given an absolute path for a file (Unix-style), simplify it.
For example,
path = "/home/", => "/home"
path = "/a/./b/../../c/", => "/c"
Corner Cases:
Did you consider the case w...
分类:
其他好文 时间:
2014-06-29 23:19:26
阅读次数:
223
很多时候要用到android端调用webservice服务, 下面例子就是调用webservice 以及对流的多种方式处理;
package com.example.android_webservice;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.IOExcep...
分类:
移动开发 时间:
2014-06-29 22:06:29
阅读次数:
242
题目
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum wi...