Finished two break distance.

Used the BFS to count the cycles.
TODO:
establish comment algorithms written by me.