-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Path Operations
Task
Implement the ability to find the shortest path
Content
- Finding the shortest path between two vertices
- Checking if a path between two vertices exists
Example
Assume graph is K3 ( { v1, v2, v4 }, { edges formed with sum (e##) } ) with non-connected v3
graph.path_exist? "v1", "v2" # true
graph.path "v1", "v2" # ["v1", "v2"] ordered array
graph.path_exist? "v1", "v3" # false
graph.delete_edge! "e3" # graph
graph.path" v1", "v2" # ["v1", "v4", "v2"]