If we know the number of times we will be iterating over each vertex to get minimum path for a given graph, we can just check if we are exceeding that number to check if the