什麼是ECDSA?
Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
herrDeng網內搜尋

自訂搜尋
Ads
3009年5月25日 星期四
2025年9月16日 星期二
C C++ GCD LCM解Leetcode難題2197 Replace Non Coprime Numbers in Array[含Py3 code]
C C++ GCD LCM解Leetcode難題2197 Replace Non Coprime Numbers in Array
用binary Euclidean algorithm定義gcd,然後定義lcm之後就是用stack
[Py3 code請進]
2025年9月14日 星期日
C++ Trie prefix tree解母音拼字Leetcode 966 Vowel Spellchecker
C++ Trie prefix tree解母音拼字Leetcode 966 Vowel Spellchecker
如果unordered_set, unordered_map有其他替方案就用,能用Trie去解也算是一種成就
--------
If there are alternatives to unordered_set and unordered_map, use them. Being able to solve them with Trie is also an achievement.
2025年9月10日 星期三
C++示範bitset取代hashset解Leetcode 1733 Minimum Number of People to Teach(含Py3 code)
C++示範bitset取代hashset解Leetcode 1733 Minimum Number of People to Teach
C++ STL的unordered_set與bitset都能解這題,但執行效率差很多,有誰寫C++其執行效能要比類似的Python code還要慢上好久倍?用hashset就如此
[Python code請進 ]
2025年9月8日 星期一
Py3 C++算術建構解1317 Convert Integer to the Sum of Two No Zero Integers
Py3 C++算術建構解1317 Convert Integer to the Sum of Two No Zero Integers
[Py3解請進]
2025年9月6日 星期六
C++C py3 log4 prefix sum, bits解Leetcode難題3495 Minimum Operations to Mak...
C++C py3 log4 prefix sum/bits解Leetcode難題3495 Minimum Operations to Make Array Elements Zero
ceil(log4(x)) 可以透過 clz 計算;將 expSum 定義為部分和來計算。
[Py3 code請進]
2025年9月5日 星期五
C++ C Py3 Rust數bits解Leetcode 2749 Minimum Operations to Make the Intege...
C++ C Py3 Rust數bits解Leetcode 2749 Minimum Operations to Make the Integer Zero
[Py3解請進]
2025年8月31日 星期日
C++回遡與bitmask解Leetcode 37數獨Sudoku
C++回遡與bitmask解Leetcode 37數獨Sudoku
有些經典問題值得一解再解,雖然不是最佳解,也要比Leetcode Editorial的解有效許多。解數獨,回遡乃基本款,但加上bitmask就能篩掉許多無用的測試,就更快許多
-----
Some classic problems are worth solving again and again. Although they are not the best solutions, they are much more effective than Leetcode Editorial's solutions. Solve Sudoku by using backtracking is the basic version, but add bitmask to filter out many useless tests can make it much faster.
[codes on Leetcode]https://leetcode.com/problems/sudoku-solver/solutions/7139967/new-sol-bitmask-backtracking-beats-100/
[其他採回溯未用bitmask解法]https://www.youtube.com/watch?v=wviWrbbOdYE
2025年8月28日 星期四
Py3 C++速解Leetcode 3446 Sort Matrix by Diagonals/with Py3 code
Py3 C++速解Leetcode 3446 Sort Matrix by Diagonals
矩陣問題都是很好的迴圈、陣列練習,又加上排序那就是很好的練習題
[Py3 code請進]
訂閱:
文章 (Atom)
熱門文章
-
請用CPU-Z軟體檢測Cache & Memory 註:快取(L1-L3: SRAM) 第一級快取(L1)–通常存取只需要幾個週期,通常是幾十個KB。 第二級快取(L2)–比L1約有2到10倍較高延遲性,通常是幾百個KB或更多。 第三級快取(L3)(不...
-
需要練習的Java程式:
-
Ex1 加權平均
-
請用Java顯示以下字串:
-
計算gcd(123456789,999999999)