Comparing object graph representation to adjacency list and matrix representations

后端 未结 4 1077
清歌不尽
清歌不尽 2021-01-29 22:42

I\'m currently following Steve Yegge\'s advice on preparing for a technical programming interview: http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html

In

4条回答
  •  失恋的感觉
    2021-01-29 23:05

    Advantage of the object representation (incidence list) is that two adjacent vertices share the same instance of the edge. This makes it easy to manipulate with undirected edge data (length, cost, flow or even direction). However it uses extra memory for pointers.

提交回复
热议问题