RE in Python but AC with C++ code

Revision en1, by bharatkulratan, 2020-06-09 21:06:32

Problem Statement: Given a directed graph with N vertices and M edges. This graph may not be simple. Please decompose this graph into Strongly Connected Components and print them in topological order.

I wrote the solution in Python which was giving RE on some test case. I couldn't find the bug so rewrote the same logic in C++ which got accepted.

My question is how do I figure out these Runtime errors with my Python code. Logic should be fine, already got AC with C++ code.

Tags #graph, #scc, #python 3, #runtime

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English bharatkulratan 2020-06-09 21:06:32 643 Initial revision (published)