Split out Floyd's algorithm material