I want to insert all the values of nodes that are connected directly or indirectly with a given node 'h' to the vector "collect". In some cases, it gives the correct answer. But other times it gives segmentation falls. Why is it happening?
I want to insert all the values of nodes that are connected directly or indirectly with a given node 'h' to the vector "collect". In some cases, it gives the correct answer. But other times it gives segmentation falls. Why is it happening?