Py-Contributors / AlgorithmsAndDataStructure

Algorithms And DataStructure Implemented In Python, Java & CPP, Give a Star 🌟If it helps you
https://codeperfectplus.com/
MIT License
948 stars 642 forks source link

algorithm for bfs searching #960

Open pojith opened 8 months ago

pojith commented 8 months ago
  1. The code assumes valid input from the user. It would be beneficial to add input validation to handle cases where users might input invalid values or edges (e.g., negative vertices, vertices beyond the specified range).
  2. Error handling is minimal. Consider implementing exception handling to handle runtime exceptions gracefully. For instance, when accessing the adjacency list, it's assumed that the index is valid. Adding checks for out-of-bounds access would make the code more robust.

i will check