Graphs
Given below are 5 friends and how they are connected. If I ask you to find the shortest path for Peter to reach Tom then you will immediately answer that he should go through Sachin [Peter -> Sachin -> Tom]. It requires some effort if you want to make the computer answer the same question.…