Why sir has added an edge from 36,36 in the end?

Please explain. Why code is not working earlier?

hi @mb129162 edge 36 will not be added through the for loop. 36 will only be added as a neighbor to some node, but it wont be added as a node itself.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.