Floyd-Warshall Algorithm
Floyd-Warshall Algorithm 1: Introduction
Floyd-Warshall Algorithm 2: Comparing Algorithms
questions2 = [
{
time: "0:52",
question: "Which algorithm would you use for sparse graphs?",
answers: [
"Dijkstra's Algorithm",
"Bellman-Ford Algorithm",
"Floyd-Warshall Algorithm",
"It depends",
],
correct: 3
},
{
time: "1:34",
question: "Which algorithm would you use for dense graphs?",
answers: [
"Dijkstra's Algorithm",
"Bellman-Ford Algorithm",
"Floyd-Warshall Algorithm",
"It depends",
],
correct: 2
},
]
yt2 = new YtQuiz("Ib4_-e46yfg", questions2);
yt2.html();
Floyd-Warshall Algorithm 3: Implementation
questions3 = [
{
time: "1:33",
question: "What is the value of the shortest path found by Floyd-Warshall given the shown parameters.",
answers: [
"11",
"-20",
"Negative cycle",
"Cannot be determined",
],
correct: 3
},
{
time: "6:00",
question: "Which index represents the base case?",
answers: [
"i",
"j",
"k",
],
correct: 2
},
{
time: "10:11",
question: "What is the running time?",
answers: [ ],
correct: "O(n^3)"
},
{
time: "11:10",
question: "Where would you find the final path lengths?",
answers: [ ],
correct: "At pathLengths[from][to][n]."
},
{
time: "11:48",
question: "How do we check for negative cycles?",
answers: [ ],
correct: "At pathLengths[i][i][n] (look for negative values)."
},
]
yt3 = new YtQuiz("MrSrajT4q-A", questions3);
yt3.html();