10k

Best Time to Buy and Sell Stock Serie

121.Best Time to Buy and Sell Stock & 122.Best Time to Buy and Sell Stock II & 123.Best Time to Buy and Sell Stock III & 188.Best Time to Buy and Sell Stock IV & 309.Best Time to Buy and Sell Stock with Cooldown & 714.Best Time to Buy and Sell Stock with Transaction Fee

买卖股票是力扣中的一个系列题目,也是dp比较经典的题目。说实话我做开始做的时候是看的这个教程: 一个方法团灭Leedcode股票买卖问题。我现在再做也是遵循这个思路,我觉得他讲的很细,而且还有很多人的讨论和解释针对一些比较迷惑的点。我个人的思考思路也是类似。

所以我就不再另起篇幅去叙述我的思路。enjoy。

不过顺序的话建议是先做188题,然后在按照顺序做剩下的即可。完全搞明白188之后,其他的确实就是随便改改。

不过我还是要把我做题的笔记贴上来,是自己思路的记录或者是以后回忆的一个索引。

IMG_0803

IMG_0804

IMG_0805

IMG_0806


Buying and selling stocks is a series of topics in the force buckle, and a more classic topic for dp. To be honest I did start to do when I was watching this tutorial: a method regimented Leedcode stock buying and selling problems. I now do again is also to follow this idea, I think he speaks very fine, and there are many people's discussion and explanation for some of the more confusing points. My personal thought process is similar.

So I will not start a separate page to describe my thoughts. enjoy.

But the order is recommended ** first do 188 questions **, and then in the order to do the rest can be. After fully understanding 188, the rest is really just a casual change.

But I still want to post my notes on the questions, a record of my own thoughts or an index of future memories.

Thoughts? Leave a comment