本博客rss订阅地址: http://feed.cnblogs.com/blog/u/147990/rss

随笔分类 -  LeetCode

摘要:题目链接Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not pos... 阅读全文
posted @ 2014-06-05 13:01 tenos 阅读(1323) 评论(0) 推荐(0) 编辑
摘要:题目链接 Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses con... 阅读全文
posted @ 2014-06-05 12:06 tenos 阅读(832) 评论(0) 推荐(0) 编辑
摘要:题目链接 You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? ... 阅读全文
posted @ 2014-06-04 21:39 tenos 阅读(1613) 评论(0) 推荐(0) 编辑
摘要:题目链接The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed f... 阅读全文
posted @ 2014-05-20 13:19 tenos 阅读(6268) 评论(0) 推荐(0) 编辑
摘要:题目链接Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter... 阅读全文
posted @ 2014-05-19 14:09 tenos 阅读(2154) 评论(0) 推荐(0) 编辑
摘要:题目链接 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points ... 阅读全文
posted @ 2014-05-18 22:44 tenos 阅读(2010) 评论(0) 推荐(0) 编辑
摘要:题目链接 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as ... 阅读全文
posted @ 2014-05-18 16:56 tenos 阅读(825) 评论(0) 推荐(0) 编辑
摘要:题目链接Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-... 阅读全文
posted @ 2014-05-18 16:19 tenos 阅读(6378) 评论(0) 推荐(4) 编辑
摘要:题目链接Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word... 阅读全文
posted @ 2014-05-11 19:19 tenos 阅读(681) 评论(0) 推荐(0) 编辑
摘要:题目链接The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence... 阅读全文
posted @ 2014-05-11 16:49 tenos 阅读(6348) 评论(0) 推荐(0) 编辑
摘要:Jump Game Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Dete... 阅读全文
posted @ 2014-05-09 21:07 tenos 阅读(3498) 评论(0) 推荐(0) 编辑
摘要:题目链接Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were ini... 阅读全文
posted @ 2014-05-07 23:13 tenos 阅读(939) 评论(0) 推荐(0) 编辑
摘要:题目链接Given a collection of intervals, merge all overlapping intervals.For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18].对若干... 阅读全文
posted @ 2014-05-07 21:38 tenos 阅读(1789) 评论(2) 推荐(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,1,−5,4], the contiguous subarray [4,−1,2... 阅读全文
posted @ 2014-05-07 12:48 tenos 阅读(890) 评论(0) 推荐(0) 编辑
摘要:Unique PathsA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right a... 阅读全文
posted @ 2014-05-02 15:25 tenos 阅读(783) 评论(0) 推荐(0) 编辑
摘要:题目链接Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.首... 阅读全文
posted @ 2014-04-30 19:57 tenos 阅读(812) 评论(0) 推荐(0) 编辑
摘要:题目链接Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see bel... 阅读全文
posted @ 2014-04-22 22:47 tenos 阅读(602) 评论(0) 推荐(0) 编辑
摘要:Search Insert PositionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if ... 阅读全文
posted @ 2014-04-22 21:43 tenos 阅读(823) 评论(0) 推荐(1) 编辑
摘要:题目链接Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.For example:Input: ["tea","and","... 阅读全文
posted @ 2014-04-22 20:36 tenos 阅读(643) 评论(0) 推荐(0) 编辑
摘要:题目链接Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are th... 阅读全文
posted @ 2014-04-20 14:42 tenos 阅读(537) 评论(0) 推荐(0) 编辑


本博客rss订阅地址: http://feed.cnblogs.com/blog/u/147990/rss

公益页面-寻找遗失儿童