討論串[閒聊] 每日LeetCode
共 719 篇文章

推噓4(4推 0噓 0→)留言4則,0人參與, 2年前最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/06/23 18:48), 編輯資訊
0
1
1
內容預覽:
https://leetcode.com/problems/longest-arithmetic-subsequence/description/. 1027. Longest Arithmetic Subsequence. 給你一個整數陣列 nums,找出最長的等差子序列長度。. Example
(還有1574個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/06/22 11:03), 編輯資訊
0
1
1
內容預覽:
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/description/714. Best Time to Buy and Sell Stock with Transaction F
(還有1254個字)

推噓0(0推 0噓 3→)留言3則,0人參與, 2年前最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/06/21 00:01), 2年前編輯資訊
0
2
1
內容預覽:
https://leetcode.com/problems/k-radius-subarray-averages/description/. 2090. K Radius Subarray Averages. 給你一個整數陣列 nums 和一個數字 k 表示左右間距,返回一個陣列 res,. res
(還有2392個字)

推噓2(2推 0噓 3→)留言5則,0人參與, 2年前最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/06/19 21:12), 2年前編輯資訊
0
1
1
內容預覽:
https://leetcode.com/problems/find-the-highest-altitude/description/. 1732. Find the Highest Altitude. 有一個自行車手從高度為0的位置開始騎車,他要經過 n 個點,每個點的海拔. 距離上個點為 ga
(還有715個字)

推噓3(3推 0噓 0→)留言3則,0人參與, 2年前最新作者heterologic (仿生邊緣人)時間2年前 (2023/06/17 16:42), 2年前編輯資訊
0
1
1
內容預覽:
其實你的複雜度是 O(n^2). 因為 comb(lnum+rnum, lnum) 這裡是 O(n). 因為是在模 1000000007 底下. 所以其實可以 O(n) 預計算後 O(1) 算出 comb(lnum+rnum, lnum) % (1000000007). https://oi-wik
(還有116個字)