I want to model a maze.
I want to avoid using a matrix in which each cell has four walls (which I could easily do using a two-dimensional array where each cell contains up to four walls) because I don't want the complication of managing the bi-directional relationship with neighboring
I understand that using a graph can potentially help. (I have read this question, which suggests using a graph, and I have tried reading up on graph theory a little, but the practical implementation thereof eludes me).
Can you provide a simple to understand explanation of how to model a maze using a graph? (The language is not important; I would like to understand the concept).