Add topological sorting algorithm and minimal travis config.