herrDeng網內搜尋
自訂搜尋
Ads
2026年5月9日 星期六
2026年5月8日 星期五
LeetCode 3629 | Prime Teleportation | Fast BFS + Sieve (Beats 100%)
Sieve BFS解Leetcode 3629 Minimum Jumps to Reach End via Prime Teleportation
目前記錄為83ms. Using array version of linked lists it 's faster, say 64ms!為何結合Sieve法與BFS的問題。會被Leetcode標示為medium?
幾個100%的解
2026年5月6日 星期三
Master LeetCode 1861 | Efficient Loop Strategy for Rotating the Box | Beats 100%
C++ C Py3 loop速解Leetcode 1861 Rotating the Box
一連數日Leetcode都是"rotate"的問題,這些問題都解完了嗎?先解今天的
訂閱:
文章 (Atom)
熱門文章
-
C++用 -1 mask法達到branchless解Leetcode1513 Number of Substrings With Only 1s|Py3 1-liner 其實很容易,想練功,試試一行解,或是把if分岔拿掉 [C++無分岔解請進]
-
請用C/C++ 程式計算 S=1*1+2*2+3*3+4*4+.....+20*20=?
-
計算你的BMI
-
計算你上學期加權平均
-
算上學期加權平均
-
GCD(123456789,345634567)=?
-
何謂演算法?並列出一無窮迴圈的範例!
-
55x+27y=gcd
-
問int怎麼存-689這個數字。 int用4個bytes。 答案請用16進位表達。