摘要:
思路: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 ... 阅读全文
摘要:
题目:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints ... 阅读全文
摘要:
题目:Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a s... 阅读全文
摘要:
题目:Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note... 阅读全文