Why 36 was not considered before adding 36,36 separately as we would add 35,36 through the for loop
??
please tell this
Why 36 was not considered before adding 36,36 separately?
@Ramitgoel it is a directed graph, so when we add 35, 36 only 35 is added in the key (36 is its neighbor, but 36 is not added in the list of nodes itself, it is merely a neighbor of one node)
we cannot add 36,36 in that loop itself because 0 is not a number that will roll on the dice. So since this is an exception, we just handle it separately.