- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 LeetCode-70-Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? 题意:爬台阶问题。每次能爬一个或两个台阶,问一
2016-06-24 23:14:32 317
原创 LeetCode-66-Plus One
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. 题意:给定一个由数组表示的数字
2016-06-24 22:35:22 287
原创 LeetCode-62-Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the
2016-06-23 07:50:46 364
原创 LeetCode-53-Maximum Subarray
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,2,1,−5,4], the contiguous subarray [4,−1,2,1] ha
2016-06-22 23:29:22 262
原创 LeetCode-15-3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not contain
2016-06-22 22:47:35 238
原创 LeetCode-9-Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space. 判断一个整数是否是回文数。 思路:求出数字abcd的逆序的数值dcba,如果是回文数的话,那么abcd==dcba。 时间复杂度:O(n) python代码: class Soluti
2016-06-22 22:46:41 295
原创 LeetCode-1- Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution. Example: Given nums = [
2016-06-22 22:45:38 275
飞机订票系统
2014-12-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人