← Quiz: Closures and Warshall's Algorithm: all 10 questions
Quiz: Closures and Warshall's Algorithm · Question 7 of 10
What is the time complexity of Warshall's algorithm on n elements?
What is the time complexity of Warshall's algorithm on n elements?
- A.O(n)
- B.O(n²)
- C.O(n³)
- D.O(2ⁿ)
Answer & explanation
Correct answer: O(n³)
Three nested loops over k, i and j.
Can you get the rest right without peeking?
Take the timed Quiz: Closures and Warshall's Algorithm quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →