https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
Question:
Explain
Two pointer method.
建立 pointers: left, right
建立 max_profit 持續追蹤最大獲利值
Recursion:
設定停止條件:right pointer index > prices list 長度
尋找最小值,比較最大值
https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
Two pointer method.
建立 pointers: left, right
建立 max_profit 持續追蹤最大獲利值
Recursion:
設定停止條件:right pointer index > prices list 長度
尋找最小值,比較最大值
Algorithm Developer focused on Computer Vision and Image Process.