Optimized C# Code [ Asking for help ]

Revision en5, by ktkrsk, 2020-06-05 19:36:45

Hi, I'm trying to solve this SPOJ problem. The simplest BFS for each node works for C++ but not for C#(time constrains). I tried to optimize it a little by spliting the graph into strongly connected components but to no avail — the TLE is still here. I'm wondering is it possible to solve this problem in C# or is the dataset too big / time constrait too low? Is there some special algorithm to solve this problem faster than BFS for each node seperated into SCC? Please help.

Tags graphs, csharp, c#, #optimization

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English ktkrsk 2020-06-05 19:36:45 0 (published)
en4 English ktkrsk 2020-06-05 19:36:38 1 Tiny change: 'dataset to big / ti' -> 'dataset too big / ti' (saved to drafts)
en3 English ktkrsk 2020-06-05 19:35:55 0 (published)
en2 English ktkrsk 2020-06-05 19:35:43 438
en1 English ktkrsk 2020-06-05 19:33:20 124 Initial revision (saved to drafts)