Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
(移至...)
首頁
密碼學
程式設計Programming
APP
計算機概論
▼
2026年9月4日 星期五
0ms C++ Py3 |Suffix MIN與Prefix MAX解Leetcode 3903, 3904 Smallest Stable Index
0ms C++ Py3 Suffix MIN與Prefix MAX解Leetcode 3903, 3904 Smallest Stable Index
使用一個名為 suf 的陣列來記錄字尾最小值(suffix min)。
接著進行動態Prefix MAX(字首最大值)的計算,以找出何時滿足Max-suf[i] leq k!
[Py3 code請進]
2026年9月2日 星期三
0ms C++ 1-line Py3解Leetcode 3875, 3876 Construct Uniform Parity Array
0
ms C++ 1-line Py3解Leetcode 3875, 3876 Construct Uniform Parity Array
一次解Leetcode 3875, 3876,code很簡單,重點是邏輯。
Solving LeetCode 3875 & 3876 together. Simple code, focus is on the logic.
[code on Leetcode 3875]
https://leetcode.com/problems/construct-uniform-parity-array-i/solutions/8496231/1beats-100-by-anwendeng-o9jh/
‹
›
首頁
查看網路版