What data structure represents these images?
- Items below with the same number, are the same item
- I do not think there can be a cycle.
edit:
Image is no longer needed, (see 1 & 2 above). It is not a graph because a graph requires a set of items and a set does not allow dup开发者_如何转开发licate items. I've already worked through this issue but the visual is misleading.
Yep, looks like a graph. You might be able to make the distinction of an acyclic, directed graph since you're wanting to orient the structure a specific way.
http://en.wikipedia.org/wiki/Directed_acyclic_graph
精彩评论