4

You may very well have some examples where you can discuss state machines and hence state diagrams, that is, graphs. For example, if you're creating a game with a computer controlled character, that character might be in different states: pursue, search, attack <-- you can introduce a graph representing the states and transitions. I wrote about this a ...


2

I think the best place it could go would be whenever 2D arrays are introduced. You could use them to represent the adjacency matrix of a graph and use that to begin answering all kinds of graph theory questions. You potentially could also cover it after going through class design and ArrayLists if you want to create a Vertex, Edge, and Graph classes... ...


Only top voted, non community-wiki answers of a minimum length are eligible