上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 28 下一页
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes... 阅读全文
posted @ 2015-05-30 21:10 TonyLuis 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Given two words (beginWord and endWord), and a dictionary, find the length of shortest transformation sequence from beginWord to endWord, such that:On... 阅读全文
posted @ 2015-05-27 11:00 TonyLuis 阅读(662) 评论(0) 推荐(0) 编辑
摘要: Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that: Only one letter can be c... 阅读全文
posted @ 2015-05-27 10:52 TonyLuis 阅读(354) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan... 阅读全文
posted @ 2015-05-26 17:43 TonyLuis 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree. For example:Given the below binary tree, 1 ... 阅读全文
posted @ 2015-05-26 17:26 TonyLuis 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet... 阅读全文
posted @ 2015-05-26 16:51 TonyLuis 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet... 阅读全文
posted @ 2015-05-26 14:39 TonyLuis 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction ... 阅读全文
posted @ 2015-05-25 16:24 TonyLuis 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 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 example, given the fo... 阅读全文
posted @ 2015-05-25 10:59 TonyLuis 阅读(249) 评论(0) 推荐(0) 编辑
摘要: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1].解题思路:注意,本题的k相当于上题的k+1,其他照搬即可,JAVA实现如下: pub... 阅读全文
posted @ 2015-05-24 16:55 TonyLuis 阅读(213) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 28 下一页