June 2017
Beginner to intermediate
296 pages
7h 4m
English
So let's say that the s node represents the Hulk. We want to measure how many degrees of separation people are from the Hulk. Initially, we're going to color all the nodes white, this means that they are completely unprocessed. We're going to have an initial distance of infinity, this means that we just don't know the degrees of separation yet. They are infinitely far away from each other because we haven't computed anything yet:

We know that we want to start with the Hulk who is in the s node. We're going to change the color of that node to gray. The color gray means that a node needs to be expanded ...
Read now
Unlock full access