Getting segmentation fault. https://ide.codingblocks.com/s/231882
BFS- Shortest Path
Showing in default test case
@Rishabh3699 hey your logic is not correct ,check this corrected code:https://ide.codingblocks.com/s/70718
Is there a way to solve it without using map?
Found the error in my code. Didnt consider bidirectional edges and had to subtraction 1 from the input because 0 based indexing.