Implementation of some famous graph algorithms