Bit interview question

Implement a routing algorithm in a language of your choice.