I am trying to get an algorithm to convert an adjacency list to adjacency matrix to write a function in my own way in C. Hope someone will help me. Thanks in advance.
I am trying to get an algorithm to convert an adjacency list to adjacency matrix to write a function in my own way in C. Hope someone will help me. Thanks in advance.
- Start with all zeroes
- For every pair of adjacent nodes
- Put a one in that spot in the matrix
- That's it.