摘要:
Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onlyO(... 阅读全文
posted @ 2015-02-09 13:20
Vae永Silence
阅读(111)
评论(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 fol... 阅读全文
posted @ 2015-02-09 13:19
Vae永Silence
阅读(126)
评论(0)
推荐(0)
摘要:
Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie... 阅读全文
posted @ 2015-02-09 13:18
Vae永Silence
阅读(117)
评论(0)
推荐(0)
摘要:
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2015-02-09 13:16
Vae永Silence
阅读(120)
评论(0)
推荐(0)
摘要:
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2015-02-09 13:15
Vae永Silence
阅读(138)
评论(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-02-09 13:14
Vae永Silence
阅读(120)
评论(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: Pana... 阅读全文
posted @ 2015-02-09 13:13
Vae永Silence
阅读(142)
评论(0)
推荐(0)
摘要:
Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstarttoend, such that:Only one letter can be changed... 阅读全文
posted @ 2015-02-09 13:11
Vae永Silence
阅读(180)
评论(0)
推荐(0)
摘要:
Given two words (startandend), and a dictionary, find the length of shortest transformation sequence fromstarttoend, such that:Only one letter can be ... 阅读全文
posted @ 2015-02-09 13:10
Vae永Silence
阅读(243)
评论(0)
推荐(0)
摘要:
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 longest ... 阅读全文
posted @ 2015-02-09 13:07
Vae永Silence
阅读(167)
评论(0)
推荐(0)