[AI字幕]openai-whisper python程式產生字幕可用。
先說明一下這是後知後覺的解答,所謂後知就是股票價格已知存在陣列(清單),當然就要用迴圈練習,雙迴圈暴力解需時O(n**2),當然不用,採python單一迴圈解答「最佳股票的買賣時機#LeetCode 121 Best Time to Buy and Sell Stock」,解法簡單快速O(n)時間。這是僅能一次買賣的問題,還有其他類似的問題陸續解出。
[code on Leetcode]https://leetcode.com/problems/best-ti...
[這是可當日沖銷的無交易費,100%C++ 解答LeetCode 122 Best Time to Buy and Sell Stock 2] • 100%C++ 解答LeetCode 122 Best Time to Buy an...
[LeetCode清單] • python一行指令秒搞定#LeetCode 50 Pow(x,n)羃次方擊敗98.66%