2015年3月19日

摘要: Best Time to Buy and Sell Stock IVSay you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find t... 阅读全文

posted @ 2015-03-19 12:32 Maples7 阅读(1007) 评论(0) 推荐(0)

摘要: Rotate ArrayRotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,... 阅读全文

posted @ 2015-03-19 12:23 Maples7 阅读(393) 评论(0) 推荐(0)