//adjacency list implementation

my code is showing segmentation fault .pls point out mistakes,thanks

@Keshav99, at line 50, you have g.addEdge(3,4);
since , you have initialized v with 4 thus you can only have nodes valued from 0-3
so 3,4 will cause segmentation fault as it will access l[4] which is not present
corrected code : https://ide.codingblocks.com/s/241602

thank u so much : )