Pergunta de entrevista da empresa Amazon

Graphs - finding segment between two child nodes