分類清單

Graph

Searching

  • BFS
  • DFS

Shortest Path

  • Dijkstra
  • Floyd-Warshall
  • DAG 找最長路徑
  • Bellman-Ford + SPFA優化 (可處理負權 和 找負環)

MST (minimum spanning tree)

  • Prim
  • Kruskal

Assignment problem

  • 匈牙利演算法

Network Flow

  • Ford-Fulkerson
  • 中國郵差定理 - minimum cost flow

Others graph

  • Union - Find
  • 尤拉圖
  • 騎士巡邏

DP

  • 背包問題
  • 最長遞增子序列(LIS)
  • 最長回文子字串(LPS)
  • 最大公共子字串(LCS)

Number Theory

  • 擴展歐幾里得
  • 快速冪
  • 質數篩法 - 埃式/線性

DataStructure