Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Everything is a graph doesn't mean you can make a graph from other data structures, it means you have to make other data structures from a graph.

A graph isn't defined as a list of nodes. A list is defined as a directed graph where each node has one vertex in each direction.



But why? What would that make easier?

A list is defined as a directed graph where each node has one vertex in each direction.

That definition works equally well for existing languages, e.g.

    struct Node {    
      struct Node *prev, *next;
      int payload;
    }:
The types gives you some constraints on the shape of the graph.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: