|
Hello once again!
First of i have an undirected graph with 10k points and 37k connections.Every point stores what connection it has. Now my job is to create method which will find 1000, 5000 points connected to each other without points repeating in my path.At the moment my method can find only 100 points which is far from 5k.
What my method does: Traverse through points and stores those points in vector so i know which ones i visited. If i come to a dead end i delete connection second last element in vector and pop last element in vector. Also i store the dead end point so i dont go to it again. My method is on laptop so i can post i later if any1 needs to see it.
Now iam looking for some tips to repair this method to find 5k points. Would it dfs or bfs algorithm be good for such a task ?
|