herrDeng網內搜尋

自訂搜尋
Ads
2025年3月8日 星期六
C++ Py3 Sliding window速解Leetcode 2379 Minimum Recolors to Get K Consec...
C++ Py3 Sliding window速解2379 Minimum Recolors to Get K Consecutive Black Blocks
[Py3 解含過程輸出請進]
2025年3月3日 星期一
2025年2月26日 星期三
C++ prefix sum Kadane Python一行解Leetcode 1749. Maximum Absolute Sum of An...
cpp prefix sum Kadane Python一行解Leetcode 1749. Maximum Absolute Sum of Any Subarray
[解答請進]
2025年2月19日 星期三
C++py3排列組合與binary表達解Leetcode 1415 The k th Lexicographical String of Al...
C++py3排列組合與binary表達解Leetcode 1415 The k th Lexicographical String of All Happy Strings of Length n
總共有3*2^(n-1)個happy strings要求第k個。先算(k-1)除以2^(n-1)的商q與餘數r,s[0]由q決定,s[1:n]由r決定,化r為二進位,然後簡單處理一下就得解
[Py3解請進]
2025年2月18日 星期二
C++ Py3 reverse 2pointer解Leetcode 2375 Construct Smallest Number From D...
C++ Py3 reverse 2pointer解Leetcode 2375 Construct Smallest Number From DI String
2025年2月14日 星期五
C++ OOP Prefix Product解Leetcode 1352 Product of the Last K Numbers
C++ OOP Prefix Product解Leetcode 1352 Product of the Last K Numbers
Leetcode這題1352. Product of the Last K Numbers,是很好的OOP題目,除了談談class之外,還能練習一下prefix product的概念(與prefix sum類似但要小心0)
[C++解請進]
訂閱:
文章 (Atom)
熱門文章
-
請用CPU-Z軟體檢測Cache & Memory 註:快取(L1-L3: SRAM) 第一級快取(L1)–通常存取只需要幾個週期,通常是幾十個KB。 第二級快取(L2)–比L1約有2到10倍較高延遲性,通常是幾百個KB或更多。 第三級快取(L3)(不...
-
需要練習的Java程式:
-
Ex1 加權平均
-
計算gcd(123456789,999999999)
-
請用Java顯示以下字串: