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

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

A. | o(1) |

B. | o(n) |

C. | o(n2) |

D. | o(5) |

Answer» B. o(n) | |

Explanation: the time complexity of kadane’s algorithm is o(n) because there is only one for loop which scans the entire array exactly once. |

View all MCQs in:
Design and Analysis of Algorithms

- 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?
- What is the time complexity of Kruskal’s algorithm?
- Worst case is the worst case time complexity of Prim’s algorithm if adjacency matrix is used?
- What is the time complexity of the brute force algorithm used to find the longest common subsequence?
- What is the time complexity of the brute force algorithm used to find the length of the longest palindromic subsequence?

Login to Continue

It will take less than 2 minutes

Report MCQ