Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
(移至...)
首頁
密碼學
程式設計Programming
APP
計算機概論
▼
2024年8月23日 星期五
C++ stringstream解分數加減Leetcode 592 Fraction Addition and Subtraction
›
C++ stringstream解分數加減Leetcode 592 Fraction Addition and Subtraction 程式設計分數加減很難嗎?計算容易,但處理字串費事,用stringstream就簡單了
2024年8月17日 星期六
C++ DP動態規劃解Leetcode 937 Maximum Number of Points with Cost
›
C++ DP動態規劃解Leetcode 937 Maximum Number of Points with Cost 有些標示medium要比標示hard的問題還要難,Leetcode 1937. Maximum Number of Points with Cost,DP動態規...
2024年8月15日 星期四
python C++ Greedy速解找零問題Leetcode 860 Lemonade Change
›
python C++ Greedy速解找零問題Leetcode 860 Lemonade Change b=20時貪婪演算法保持檢查順序,先找十塊,不要改變檢查順序,否則不起作用 [python解請進] -----
2024年8月10日 星期六
C++ EULER特徵數定理與UnionFind解Leetcode959 Regions Cut By Slashes
›
EULER特徵數定理與UnionFind解Leetcode959 Regions Cut By Slashes EULER特徵數定理:平面連通圖有V-E+F --------------
2024年8月9日 星期五
Python C++解魔方陣Leetcode 840 Magic Squares In Grid
›
Python C++解魔方陣Leetcode 840 Magic Squares In Grid. 影片一開始就是展示如何解一個3x3的魔方陣,5總是在中心 In the beginning of film is to show how to solve a 3x3 ma...
2024年8月2日 星期五
Python C++ sliding windows解Leetcode 2134 Minimum Swaps to Group All 1'...
›
Python C++ sliding windows解Leetcode 2134 Minimum Swaps to Group All 1's Together II 使用sliding window, 由於陣列是循環的,所以右邊的游標r應該一直走到n+n0或n+n1...
2024年7月26日 星期五
C++Floyd Warshall解Leetcode 1334 Find the City With the Smallest Number ...
›
C++Floyd Warshall解Leetcode 1334 Find the City With the Smallest Number of Neighbors at a Threshold 由於每對 (i, j) 都有許多最短路徑需要計算,採用 Floyd-Warsh...
2024年7月24日 星期三
Python C++速解排序問題Leetcode 2191 Sort the Jumbled Numbers
›
今日Leetcode的排序問題2191. Sort the Jumbled Numbers,主要有兩個部份,一個是把數字轉成另一個數字,用int就行,採Least Significant Digit First。然後排序,不建議用自訂Lambda,跑能過但非常慢;更不建議自製...
2024年7月20日 星期六
Python C++採Greedy 2 pointers解Leetcode 1605 Find Valid Matrix Given Row ...
›
Python CPP採Greedy 2pointers解Leetcode 1605 Find Valid Matrix Given Row and Column Sums 將大小為 r*c 的陣列 arr 初始化為全 0 獨立的 i、j 是 2 個指標。使用迴圈繼續 設 x=m...
2024年7月2日 星期二
Python C++速解multiset問題Leetcode 350 Intersection of Two Arrays II
›
Python C++速解multiset問題Leetcode 350 Intersection of Two Arrays II 兩個多重集合(multiset)的交集是兩個多重集中公共元素的多重集合。 Python code請進
‹
›
首頁
查看網路版