Cmd命令集
收集些Windows上的快捷操作。
There are n coins with different value in a line. Two players take turns to take one or two coins from left side until there are no more coins left. The player who take the coins with the most value wins.
Could you please decide the first player will win or lose?
Given A = [1,2,2], return true.
Given A = [1,2,4], return false.
原本并没有重视这个技巧,但是后来回过头再来做几道关于DP的题目,意外地发现这个做法可以将O(n^2)的复杂度优化至O(n)!所以打算将这类题目做一个总结吧。
Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
For example, given height = [2,1,5,6,2,3].
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment