網頁

2026年6月27日 星期六

C++ bitset array依數字 3、13、177、31622分割解Leetcode 3020 Find the Maximum Number of Elements in Subset


C++ bitset array依數字 3、13、177、31622分割解Leetcode 3020  Find the Maximum Number of Elements in Subset
不用hashmap,另圖蹊徑才有辦法快速解答Leetcode 3020. 
-----
No Hashmap—forging a new path to crush LeetCode 3020 fast.
Trick: isqrt(1e9)=31622 , 177, 13,  3
 #anwendeng 

2026年6月24日 星期三

Beats 100%|C/C++矩陣冪次方解Leetcode難題3700 Number of ZigZag Arrays II


Beats 100%|C/C++矩陣冪次方解Leetcode難題3700  Number of ZigZag Arrays II
在這段影片中,我將深入解析如何使用 矩陣快速冪 (Matrix Exponentiation) 來高效解決 LeetCode 難題 3700:Number of ZigZag Arrays II。這題是 ZigZag Array 系列的進階版本,對時間複雜度有極高要求。

2026年6月22日 星期一

0ms|Leetcode1189 text中可有幾個ballon|C++ 1 liner Py3


0ms|Leetcode1189 text中可有幾個ballon|C++ 1 linerPy3 
會處理count freq,接著來就能處理counting sort
[Leetcode 1833 Maximum Ice Cream Bars|Greedy counting sort]https://www.youtube.com/watch?v=4deOmcdAekg
[Py3 1-liner請進]