随笔分类 -  leetcode

摘要:Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning 阅读全文
posted @ 2019-06-10 10:36 搞钱的阿军 阅读(239) 评论(0) 推荐(0)
摘要:该题相对之前两道题难了不少,做了两遍还是有点不熟。给定一个股票价格的数组,让你最多只能交易两次,求能够获得的最大利润。 这里有一个关键点:在某一天买入股票,并在当天卖出股票是合法的(支持t+0交易,不得不吐槽天朝t+1交易机制)。 举个例子[1,3,8],我们可以选择在第0天买入,然后第2天卖出。也 阅读全文
posted @ 2019-06-09 22:54 搞钱的阿军 阅读(154) 评论(0) 推荐(0)