Which of the following algorithms can be used to most efficiently determine the presence of a cycle in a given graph?