There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply () below!

Agree with a comment or answer? Like () to up-vote the contribution!

I do not understand how to read an adjacency list. So, is it 1 for every vertex the vertex in question is connected to? If so would there be a graph where all the entries in the adjacency list is 1?

What kind of graph would have an adjacency matrix with every cell filled?

Wouldnt that be a a graph with every node connected to each other. Obviously some would be more ‘connected’ than others but that would ensure every node even if the path is long would have an edge to connect to.

These last two questions seem to make me want to answer them with an abundance of caution … because 1) what is the indexing here? if its zero based for question one anyways A being zero B being the next node 1 or if it’s one indexed then 2 …

Looking for an edge in the adjacency list, how many vertices do we need to search through for P ?
P is found in the B edge list so you’d only have to reach node B to find it which luckily in this example even though there is no distinct indexing mentioned appears early in the list??!

so zero index position 1 for 1 indexing position 2

How many for B ?
Well that hits with the first traversal with node A …

Looking for an edge in the adjacency list, how many vertices do we need to search through for P?

Am I the only one finding this ambiguous? It depends on what vertex you start with: if you start with ‘X’ as your key you need to look through a list with two vertices, and if you start with ‘B’ you need to look through a list with four vertices.

Thank you!!
I thought I was the only one thinking this. The question says “…how many vertices do we need to search through for P” and my immediate thought was, “Starting from where?”