herrDeng網內搜尋
自訂搜尋
Ads
2026年11月4日 星期三
2026年10月31日 星期六
python requests讀取台積電股票json資訊爬蟲練習
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
2026年10月29日 星期四
2026年10月28日 星期三
2026年10月23日 星期五
2026年10月22日 星期四
2026年10月21日 星期三
2026年10月17日 星期六
2026年10月15日 星期四
2026年10月14日 星期三
2026年10月7日 星期三
2026年9月23日 星期三
2026年9月14日 星期一
2026年9月9日 星期三
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
0ms 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/
2026年8月28日 星期五
0ms |C++貪婪mask dp解Leetcode難題3734 Lexico min Palindrome greater then target
0ms |C++貪婪mask dp解Leetcode難題3734 Lexico min Palindrome greater then target
這部影片詳細解析了 LeetCode 3734 難題。我們將結合「貪婪演算法 (Greedy)」與「位元遮罩動態規劃 (Bitmask DP)」技術,目標是找出比給定字串大、且字典序最小的回文字串。影片中展示了如何透過剪枝與狀態壓縮將效能優化至 0ms,達成最速解。適合想挑戰高難度演算法與 C++ 實作技巧的開發者。
2026年8月21日 星期五
C++ 0ms使用inclusion exclusion, bitmask DP, 二元搜尋解Leetcode難題3116 Kth Smallest Amount With Denomination
C++ 0ms使用inclusion exclusion, bitmask DP, 二元搜尋解Leetcode難題3116 Kth Smallest Amount With Denomination
[codes on Leetcode]https://leetcode.com/problems/kth-smallest-amount-with-single-denomination-combination/solutions/8473317/reduced-coins-mask-dpbinary-searchbeats-6acqj/
這是一題難度標記為 Hard 的 LeetCode 3116 題目。本影片將深入解析如何利用 C++ 達到極致的 0ms 執行效能!我們不只是解題,更要追求最優解。
2026年8月20日 星期四
0ms Branchless Leetcode 3069 | Py3 & C++ 高速解法
Py3 CPP 速解3069 Distribute Elements Into Two Arrays I
為什麼要寫branchless code?避免 CPU 的分支預測失敗!當代CPU 會預先猜測條件判斷(如 if-else)的結果並繼續往下執行。當預測成功時,猜對了效能極佳,猜錯了會造成時間上的懲罰。利用容器index的True or False達成Branchless code!
[C++ Python3 codes請進]
2026年8月15日 星期六
0ms C++ Py3 1 line 解 Leetcode 3702 sequence With Non Zero Bitwise XOR
0ms C++ Py3 1 line 解 Leetcode 3702 sequence With Non Zero Bitwise XOR
迴圈解不稀奇,Python一行解也不稀奇,C++一行解就很少了!
[C++ Py3 一行解請進 👇]
訂閱:
文章 (Atom)
熱門文章
-
計算你上學期加權平均
-
河內塔程式
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
將費氏數列輸出至一long 陣列 其中f[0]=1, f[1]=2, f[n]=f[n-1]+f[n-2] (n>=2)
-
Fibonacci sequence: a[0]=1, a[1]=1, a[2]=2, a[3]=3, a[4]=5,...... In general, a[n]=1 as n=0,1, a[n]=a[n-1]+a[n-2] as n>=2. Use this...
-
簡答題: 比較C/C++, Java, VB的差異!
-
算上學期加權平均
-
LinkedList Exercise mm/dd Java 中的 LinkedList mm/dd 列印課表 mm/dd GCD mm/dd Ex2 mm/dd 用Eclipse寫hello.java mm/dd
-
解一元二次方程式 ax^2+bx+c=0, x=?