bfs
requirement:
Using the breadthFirstSearch method, implement a method to compute and return a shortest path (in hops) between a pair of given vertices. The method should have the following header:
String[] shortestPath(String source, String destination)
The String array that is returned should contain a sequence of vertices that corresponds to a shortest path from the source vertex to the destination vertex. Thus slot 0 in this String array should contain source and the last slot in this String array should contain destination. The length of this array should be exactly equal to the length of a shortest path from source to destination.
what i've 'written':
string[] shortestPath ( String source, String destination)
source = 0;
destination
in shortestPath[], first slot is source
for words differing by one letter, store in shortestPath[source + 1]
then [source + 1] becomes source, continue until destination is equal to shortestPath[destination -1]
somehow compare multiple paths from source to destination.
array with smallest index (should index the 'hops', or number of words from source to destination) is returned
i suppose my biggest problem is going to store all the hops into arrays, will i have to use many arrays, or can i have it all take place in one array?

