title: Directed graph node neighbors
body: <p>In a directed graph, what is a definition of a node neighbor ?</p>
  
  <p>To be more specific, in the graph below, which nodes are considered to be neighbors of node 0?</p>
  
  <p><a href="https://i.stack.imgur.com/s61rf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/s61rf.png" alt="enter image description here"></a></p>
  
  <p>Cracking the coding interview seems to suggest that both 1 and 2 are neighbors of 0, but it doesn't state it clearly and I can't find a proper definition online.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>My confusions arises from this specific passage:</p>
  
  <blockquote>
    <p>In the adjacency matrix representation, you will need to iterate through all the nodes to identify a node's neighbors.</p>
  </blockquote>
  
  <p>This seems to imply that 2 is considered 0's neighbor, otherwise you just need to go through 0's row to find its neighbors. But it never says this clearly.</p>