Also possible to represent graph implicitly: Just implement Adj(u) that returns all neighbors of u. Example: Infinite grid. Squares are adjacent to top, ...
確定! 回上一頁