Only some words to suggest a good read if you are interested in programming and you want to know more about graph theory. Here you can find a good book on the argument, titled "Algorithmic graph theory", it's free, and it contains with examples based on sage, an open source mathematics software package. Enjoy