RE in Python but AC with C++ code

Правка en1, от 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.

Теги #graph, #scc, #python 3, #runtime

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский bharatkulratan 2020-06-09 21:06:32 643 Initial revision (published)