Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
(移至...)
首頁
密碼學
程式設計Programming
APP
計算機概論
▼
2025年9月25日 星期四
Py3 C++ DP動態規劃速解Leetcode 120 Triangle
›
Py3 C++ DP速解Leetcode 120 Triangle 這題就是用動態規劃解,表列法比較容易 [Py3解請進]
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 alt...
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 cod...
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 定義為部分和來計算。 [...
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年9月2日 星期二
Py3 C++排序loop解Leetcode 3025 3027 Find the Number of Ways to Place People
›
Py3 C++排序loop解Leetcode 3025 3027 Find the Number of Ways to Place People [Py3 code請進]
2025年8月31日 星期日
C++回遡與bitmask解Leetcode 37數獨Sudoku
›
C++回遡與bitmask解Leetcode 37數獨Sudoku 有些經典問題值得一解再解,雖然不是最佳解,也要比Leetcode Editorial的解有效許多。解數獨,回遡乃基本款,但加上bitmask就能篩掉許多無用的測試,就更快許多 ----- Some classic...
2025年8月28日 星期四
Py3 C++速解Leetcode 3446 Sort Matrix by Diagonals/with Py3 code
›
Py3 C++速解Leetcode 3446 Sort Matrix by Diagonals 矩陣問題都是很好的迴圈、陣列練習,又加上排序那就是很好的練習題 [Py3 code請進]
‹
›
首頁
查看網路版