Amazon Interview Question

Question - Count all lists of adjacent nodes stored in an array