Implement a function that converts an adjacency matrix to an adjacency list for
a directed unweighted graph using the template in code.js
. Test your new
function; I've provided some basic testing code that uses
jsverify in code.test.js
. Now, the test code
does contain the solution, so you can have a look at it if you get stuck, but
try not to peek before attempting to solve it on your own.
What is the runtime complexity of the conversion that you implemented? Does it depend on the number of vertices, the number of edges, or both?
Describe your reasoning and the conclusion you've come to. Your reasoning is the most important part. Add your answer to this markdown file.
Implement a function to convert an adjacency list to an adjacency matrix and analyze it as above.