经典4Sum题,但是需要在4个数组中分别找到一个数来相加
LeetCode 324 Wiggle Sort II
Posted on
|
In
ACM
摇摆排序,要求nums[0] < nums[1] > nums[2] < nums[3]... 且时间复杂度为O(n),额外空间为O(1)
LeetCode 309 Best Time to Buy and Sell Stock with Cooldown
Posted on
|
In
ACM
炒股,能够买卖多次,但是每次买完需要等一天才能再次买入,问最多能赚多少钱