Oracle Interview Question

Graph Data structure question and Java 8 basics