/* 自定義代碼塊樣式 */
Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
首頁
密碼學
程式設計Programming
APP
計算機概論
herrDeng網內搜尋
自訂搜尋
Ads
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.
[codes on Leetcode]
https://leetcode.com/problems/vowel-spellchecker/solutions/7187402/vowel-bitmask-trie-vs-hash-tables-15ms-beats-100/
較新的文章
較舊的文章
首頁
查看行動版
訂閱:
意見 (Atom)
熱門文章
用 while loop
用 while loop 算 s=3*3+4*4+....88*88
ex1算平均
33, 45, 87, 99, 27 算平均
ex. SHA-256, SHA3-256, RIPEMD-160
請問"虛擬貨幣用的雜湊函數"的SHA-256, SHA3-256, RIPEMD-160的雜湊摘要值
計算你上學期加權平均
計算你上學期加權平均
輸出課表代碼矩陣
輸出課表代碼矩陣 Hint: 2-D array, double-for loop
Ex4 請用100字內表達對3D列印的看法
某人說「3D列印如果成為工業革命,我名字倒過來寫」,但人類已經可以用3D列印印心臟,也印出人造衛星。請用100字內表達對3D列印的看法
Ex5 請問int怎麼存-689這個數字
問int怎麼存-689這個數字。 int用4個bytes。 答案請用16進位表達。
產生 亂數
產生10個0~99的亂數存在a[10] 中
請用格式化輸出排 9x9乘法表
請用格式化輸出排 9x9乘法表 hint: double-for, "%nd"
data structure 期中考乙
data structure 期中考乙