So I am working on doing a depth-first search on a graph of an unknown length. The graph itself will be coded as a "2D" array adjacency table.
Ex:
Graph: .word 0, 1, 1, 1, 0
.word 1, 0, 1, 1, 1
.word 1, 1, 0, 1, 1
.word 1, 1, 1, 0, 1
.word 1, 1, 0, 0, 0
But, this graph can be any size, when it gets graded the TAs can put a graph of any size in my code to test. So I do not know the size of the graph.
This becomes a problem when I want to check the adjacency table. How do I know when I have reached the end of a row? How do I advance to a particular row? I know how to advance by word, but I do not know how I could advance to the next row without knowing how many elements (and therefore bytes) I need to advance through.