Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
首頁
密碼學
程式設計Programming
APP
計算機概論
herrDeng網內搜尋
自訂搜尋
Ads
2024年4月24日 星期三
C++ UnionFind BFS DFS解圖論問題Leetcode 1971 Find if Path Exists in Graph
C++ UnionFind BFS DFS解圖論問題Leetcode 1971 Find if Path Exists in Graph
使用UnionFind class實作容易,效能又好,這對無向圖特別有效。
為了比較,BFS、DFS也實作
按我讀文 »
Python C++速解Leetcode 1137 N th Tribonacci Number
Python CPP速解Leetcode 1137 N th Tribonacci Number
先用遞迴、再加上cache,然後轉成動態規劃,當然還可以用矩陣冪次方
按我讀文 »
較新的文章
較舊的文章
首頁
查看行動版
訂閱:
文章 (Atom)
熱門文章