2018年1月22日

Best Time to Buy and Sell Stock

摘要: 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 @ 2018-01-22 18:21 夜的第八章 阅读(134) 评论(0) 推荐(0) 编辑

Best Time to Buy and Sell Stock III

摘要: 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 comple 阅读全文

posted @ 2018-01-22 18:15 夜的第八章 阅读(136) 评论(0) 推荐(0) 编辑

distinct subsequences

摘要: Given a string S and a string T, count the number of distinct subsequences of S which equals T. A subsequence of a string is a new string which is for 阅读全文

posted @ 2018-01-22 15:53 夜的第八章 阅读(110) 评论(0) 推荐(0) 编辑

导航