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
Problem Description:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For ex...
分类:
其他好文 时间:
2014-07-07 15:29:11
阅读次数:
280
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-07-07 14:58:47
阅读次数:
175
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
分类:
其他好文 时间:
2014-07-07 14:48:39
阅读次数:
160
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
分类:
其他好文 时间:
2014-07-02 00:24:04
阅读次数:
284
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-06-30 21:36:50
阅读次数:
292
属性的存储 属性的主要作用是存储数据,可以常量属性和变量属 性;struct FixedLengthRange {
var firstValue: Int let length: Int
}
var rangeOfThreeItems =FixedLengthRange(firstValue: 0,
length: 3)
// the range represents integer value...
分类:
其他好文 时间:
2014-06-30 18:53:33
阅读次数:
271
题目
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down...
分类:
其他好文 时间:
2014-06-30 11:10:34
阅读次数:
211
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
给定一个罗马数字,把它转换成一个整数。
把罗马数字字符串转换成字符数组先,如下表,每个数字仅对应一个字符,而且字符不一样。故可从头开始取值进行对应。
The R...
分类:
其他好文 时间:
2014-06-30 09:52:40
阅读次数:
251
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
给定一个整数,把它转换成罗马数字。
输入可以保证在1到3999之间。
下图是转换规则。
1
2
3
4
...
分类:
其他好文 时间:
2014-06-30 09:28:05
阅读次数:
308