/* 自定義代碼塊樣式 */
Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
首頁
密碼學
程式設計Programming
APP
計算機概論
herrDeng網內搜尋
自訂搜尋
Ads
2025年7月6日 星期日
C++ Py3 hashmap與binary search解Leetcode 1865 Finding Pairs With a Certain...
C++ Py3 hashmap與binary search解Leetcode 1865 Finding Pairs With a Certain Sum
基本上用 hashmap。解釋為什麼要使用排序和二元搜尋找來優化程式碼
-----
Basically use hashmap. Explain why one should use sorting and binary search to optimize the code.
[codes on Leetcode]
https://leetcode.com/problems/finding-pairs-with-a-certain-sum/solutions/6925404/unordered-map-sort-binary-search-c-37ms-99-37-py3-97-45/
[Leetcode playlist]
https://www.youtube.com/watch?v=LJPL-Ukxf8w&list=PLYRlUBnWnd5IdDHk2BjqXwesydU17z_xk
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
熱門文章
計算你上學期加權平均
計算你上學期加權平均
ex. SHA-256, SHA3-256, RIPEMD-160
請問"虛擬貨幣用的雜湊函數"的SHA-256, SHA3-256, RIPEMD-160的雜湊摘要值
用 while loop
用 while loop 算 s=3*3+4*4+....88*88
Ex4 請用100字內表達對3D列印的看法
某人說「3D列印如果成為工業革命,我名字倒過來寫」,但人類已經可以用3D列印印心臟,也印出人造衛星。請用100字內表達對3D列印的看法
輸出課表代碼矩陣
輸出課表代碼矩陣 Hint: 2-D array, double-for loop
ex1算平均
33, 45, 87, 99, 27 算平均
列舉對稱、非對稱密碼
列舉對稱、非對稱密碼各三種。
Ex5 請問int怎麼存-689這個數字
問int怎麼存-689這個數字。 int用4個bytes。 答案請用16進位表達。
ex1
請用 C/C++/java寫一簡易程式
產生 亂數
產生10個0~99的亂數存在a[10] 中
沒有留言:
張貼留言