I have posted on my website a small C++ program that I have been asked to write during an interview with Facebook at Fall 2009. One of their interview was related to graph theory and the problem was to find the the shortest distance between to nodes in a graph. The best algorithm to use to solve this problem is the breadth-first traversal algorithm.
You can look at the source code here at:
and you can read more about the breadth-first traversal algorithm in Robert Sedgewick excellent book on algorithms.
I want you to find in this blog informations about C++ programming that I had a hard time to find in the first place on the web.
|<< <||Current||> >>|