My code is working for the given test case in pycharm. And it is showing NZEC run time error and I find it difficult to identify the error. Could anyone help me to find out this error?
longestpath.py (1.2 KB)
What will happen if there are no blank lines to terminate your loop? The problem statement tells you exactly how many edges there are, why not use that?