06 2016 档案

摘要: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 cl 阅读全文
posted @ 2016-06-24 23:12 欠扁的小篮子 阅读(3798) 评论(0) 推荐(0) 编辑
摘要: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 a 阅读全文
posted @ 2016-06-24 22:27 欠扁的小篮子 阅读(1505) 评论(0) 推荐(0) 编辑
摘要: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 p 阅读全文
posted @ 2016-06-22 23:49 欠扁的小篮子 阅读(1198) 评论(1) 推荐(0) 编辑
摘要: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, 阅读全文
posted @ 2016-06-22 23:28 欠扁的小篮子 阅读(156) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-06-22 22:42 欠扁的小篮子 阅读(162) 评论(0) 推荐(0) 编辑
摘要:Determine whether an integer is a palindrome. Do this without extra space. 判断一个整数是否是回文数。 思路:求出数字abcd的逆序的数值dcba,如果是回文数的话,那么abcd==dcba。 时间复杂度:O(n) pytho 阅读全文
posted @ 2016-06-22 22:12 欠扁的小篮子 阅读(165) 评论(0) 推荐(0) 编辑
摘要: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 ex 阅读全文
posted @ 2016-06-22 22:01 欠扁的小篮子 阅读(238) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示