/* 自定義代碼塊樣式 */
Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
首頁
密碼學
程式設計Programming
APP
計算機概論
herrDeng網內搜尋
自訂搜尋
Ads
2024年2月22日 星期四
python C++計算 indegree解Leetcode 997 Find the Town Judge
python C++計算 indegree解Leetcode 997 Find the Town Judge
使用圖形解決方案。
由於信任中的每一對 e=(a, b) 實際上表示一種信任關係,可以將其視為有向邊。C++程式請進
---
按我讀文 »
2024年2月21日 星期三
python C++ bit 計算O(1)時間解Leetcode 201 Bitwise AND of Numbers Range
python C++ bit 計算O(1)時間解Leetcode 201 Bitwise AND of Numbers Range
這就是用x&(x-1)技法。有人會說計算時間是O(log n),但32-bit整數,無論是迴圈或遞迴頂多32次。如果要熟透bit處理的訣竅,還有更厲害的技法,請進
按我讀文 »
2024年2月20日 星期二
python C++高斯小學公式與xor sum速解Leetcode 268 Missing Number
python C++高斯小學公式與xor sum速解Leetcode 268 Missing Number
片中講兩種解法,一是用Gauss的n(n+1)/2公式,二是用xor-sum
第三種解法片中未顯示,採radix sort再binary search
按我讀文 »
2024年2月19日 星期一
#黑柴犬 black shiba草地跟狗朋友玩
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)
熱門文章
ex3 請用CPU-Z軟體檢測Cache & Memory
請用CPU-Z軟體檢測Cache & Memory 註:快取(L1-L3: SRAM) 第一級快取(L1)–通常存取只需要幾個週期,通常是幾十個KB。 第二級快取(L2)–比L1約有2到10倍較高延遲性,通常是幾百個KB或更多。 第三級快取(L3)(不...
簡易Java 程式
簡易Java 程式
C++ DP速解難題leetcode 3363 Find the Maximum Number of Fruits Collected/Py3 code inclusive
C++ DP速解難題leetcode 3363 Find the Maximum Number of Fruits Collected [Python解請進]
ex4.資料結構複習(程式部份)
需要練習的Java程式:
算gcd
計算gcd(123456789,999999999)
ex12 河內塔
河內塔程式
何謂public-key密碼系統?....
何謂public-key密碼系統? 何謂secret-key密碼系統? 各列舉五種!
Leetcode 342 Power of Four幾個C++一行解
Leetcode 342 Power of Four幾個C++一行解 [codes on Leetcode] https://leetcode.com/problems/power-of-four/solutions/7081839/9-ways-of-bit-manipula...
Ex5 建立三個科目的物件
建立三個科目的物件,列印輸出。
Ex5 請問int怎麼存-689這個數字
問int怎麼存-689這個數字。 int用4個bytes。 答案請用16進位表達。