- Computer Science Engineering (CSE)
- Design and Analysis of Algorithms
- What is the time complexity of Kruskal’s...

Q. |
## What is the time complexity of Kruskal’s algorithm? |

A. | o(log v) |

B. | o(e log v) |

C. | o(e2) |

D. | o(v log e) |

Answer» B. o(e log v) | |

Explanation: kruskal’s algorithm involves sorting of the edges, which takes o(e loge) time, where e is a number of edges in graph and v is the number of vertices. after sorting, all edges are iterated and union-find algorithm is applied. union-find algorithm requires o(logv) time. so, overall kruskal’s algorithm requires o(e log v) time. |

View all MCQs in:
Design and Analysis of Algorithms

- Which of the following edges form minimum spanning tree on the graph using kruskals algorithm?
- Is Coppersmith-Winograd algorithm better than Strassen’s algorithm in terms of time complexity?
- Rabin Karp algorithm and naive pattern searching algorithm have the same worst case time complexity.
- Which of the following sorting algorithm has best case time complexity of O(n2)?
- What is the worst case time complexity of KMP algorithm for pattern searching (m = length of text, n = length of pattern)?
- What is the time complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)?
- What is the worst case time complexity of a quick sort algorithm?
- Worst case is the worst case time complexity of Prim’s algorithm if adjacency matrix is used?
- What is the time complexity of Kadane’s algorithm?
- What is the time complexity of the brute force algorithm used to find the longest common subsequence?

Login to Continue

It will take less than 2 minutes

Report MCQ