02 2016 档案

摘要: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 阅读全文
posted @ 2016-02-29 23:08 `Liok 阅读(434) 评论(0) 推荐(0)
摘要:Maximal Square Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given th 阅读全文
posted @ 2016-02-28 21:23 `Liok 阅读(466) 评论(0) 推荐(0)
摘要:Perfect Squares Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. For exampl 阅读全文
posted @ 2016-02-28 20:58 `Liok 阅读(540) 评论(0) 推荐(0)
摘要:Count Prime Description: Count the number of prime numbers less than a non-negative number, n. https://leetcode.com/problems/count-primes/ 找出所有小于n的数中的 阅读全文
posted @ 2016-02-28 15:53 `Liok 阅读(528) 评论(0) 推荐(0)
摘要:Happy Number Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any po 阅读全文
posted @ 2016-02-28 00:17 `Liok 阅读(774) 评论(0) 推荐(0)
摘要:Count of Smaller Numbers After Self You are given an integer array nums and you have to return a new counts array. The counts array has the property w 阅读全文
posted @ 2016-02-27 20:06 `Liok 阅读(281) 评论(0) 推荐(0)
摘要:Patching Array Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclu 阅读全文
posted @ 2016-02-27 17:28 `Liok 阅读(273) 评论(0) 推荐(0)
摘要:Self Crossing You are given an array x of n positive numbers. You start at point (0,0) and moves x[0] metres to the north, then x[1] metres to the wes 阅读全文
posted @ 2016-02-25 23:34 `Liok 阅读(893) 评论(0) 推荐(0)
摘要:Increasing Triplet Subsequence Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the f 阅读全文
posted @ 2016-02-22 17:00 `Liok 阅读(472) 评论(0) 推荐(0)
摘要:Reconstruct Itinerary Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in 阅读全文
posted @ 2016-02-18 18:14 `Liok 阅读(536) 评论(0) 推荐(0)
摘要:Verify Preorder Serialization of a Binary Tree One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we 阅读全文
posted @ 2016-02-05 14:25 `Liok 阅读(431) 评论(0) 推荐(0)
摘要:Odd Even Linked List Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the no 阅读全文
posted @ 2016-02-04 11:23 `Liok 阅读(374) 评论(0) 推荐(0)
摘要:Power of Three Given an integer, write a function to determine if it is a power of three. Follow up:Could you do it without using any loop / recursion 阅读全文
posted @ 2016-02-04 11:08 `Liok 阅读(422) 评论(0) 推荐(0)
摘要:Longest Increasing Path in a Matrix Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to fo 阅读全文
posted @ 2016-02-04 10:57 `Liok 阅读(385) 评论(0) 推荐(0)