题目:Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k = 2, a solution is:[ [2,4], ...
分类:
编程语言 时间:
2014-07-30 09:58:03
阅读次数:
218
题目:Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3...
分类:
编程语言 时间:
2014-07-30 09:54:33
阅读次数:
195
题目:Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,...
分类:
编程语言 时间:
2014-07-30 09:49:43
阅读次数:
177
题目: Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [?2,1,?3,4,?1...
分类:
编程语言 时间:
2014-07-30 05:34:43
阅读次数:
319
百度地图照着百度的教程做的总是出现报错 请帮我看看错误在那2013-12-13 15:16168海军|分类:百度地图|浏览1252次java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.map/c...
分类:
移动开发 时间:
2014-07-30 03:18:22
阅读次数:
338
NSUserDefaults API中英文文档简介及使用
Overview
The NSUserDefaults class provides a programmatic interface for interacting with the defaults system. The defaults system allows an application to customize its behavior to match a user’s preferences. For example, y...
For example, the following code will store uploaded files under /media/photos regardless of what yourMEDIA_ROOT setting is:from django.db import model...
分类:
其他好文 时间:
2014-07-30 00:52:02
阅读次数:
207
Palindromes
A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when t...
分类:
其他好文 时间:
2014-07-29 21:57:12
阅读次数:
308
For a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits.
When M is the digitsum of N , we call N a generator of M .
For example, the digit-sum of 245 is 256 (...
分类:
其他好文 时间:
2014-07-29 21:53:12
阅读次数:
284
问题描述:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
解题思路:
每遍历出一个单词时,将该单词添加一个空格字符(如果临时字符串为空,即扫描出第一个单词,就不要添加空格字符),然后添加...
分类:
其他好文 时间:
2014-07-29 21:52:52
阅读次数:
239