hackerrank graphs

graphs
hackerrank

#1

Can anyone find what is mistake in my solution to the problem roads and libraries.
I am getting a SIGSEGV error.

https://www.hackerrank.com/challenges/torque-and-development/forum/comments/454647


#2

I think, because you don’t read graph in the first branch case when lib < road.