Graph traversal with all possible paths and shortest path based on the string length ie minimum number of vertices to be touched to reach destination