Sebastian Danicic algorithm

Sebastian Danicic algorithm