networx
=> can be installed usingpip install networkx
orpip3 install networkx
python3 [script name] {number of nodes} {probabbility of edge creation}
- example
python3 df.py 100 0.5
- example
- It creates a random graph does Breadth First Search
- It displays the path from destination node to start node
- Currently start and destination node values are supplied inside the script but can change it to take user generated input
- Breadth First Search
- Sometimes this can throw error as the graphs are genrerated randomely and some nodes might be missing