All-pairs Shortest Path


  • Floyd -Warshall Algorithm
    1.可找出所有點間的最短距離
    2.DP
    3.可處理邊是負數權重(但若是負數cycle則不行)

  • 實作

results matching ""

    No results matching ""