圖(鄰接表)

  我們先來看一個圖 我們想將這個圖的信息存儲到鄰接表中,我們需要一個數組保存節點信息,還要有一個節點用來保存與該節點相鄰的節點信息. 1 typedef struct arc_node 2 { 3 int pos; 4 int distance; 5 struct arc_node * next; 6 } Arc_node;//保存Node節點的相鄰節點信息
相關文章
相關標籤/搜索