loading...

re: Remove terrible bus routes (find an algorithm) VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Here we go for a simple Ruby solution (I couldn't be bothered to deal with files, so I just dumped your sample input 2 into a data section at the e...
 

Have you tested on the maximal N = 1e6 as stated in the problem description? Your solution seems to be O(N*N) so it will be really slow.

 

Hence “simple” not “efficient‘ 😉

code of conduct - report abuse