###### Nielit Scentist-B [02-12-2018]

October 10, 2023###### Nielit Scentist-B [02-12-2018]

October 10, 2023# Nielit Scentist-B [02-12-2018]

Question 14 |

___ is the worst case time complexity for all operations(i.e. Search,update and delete) in a general binary search tree

O(n) | |

O(nlogn) | |

O(logn) for search and insert, and O(n) for delete | |

None of these |

Question 14 Explanation:

→ Suppose the elements are not in sorted order, it will take O(n) time for worst case time complexity.

→ In question, they are not mentioned about elements are sorted or unsorted. So, worst case we have to consider unsorted elements.

→ All operations(i.e. Search,update and delete) will take O(n).

→ In question, they are not mentioned about elements are sorted or unsorted. So, worst case we have to consider unsorted elements.

→ All operations(i.e. Search,update and delete) will take O(n).

Correct Answer: A

Question 14 Explanation:

→ Suppose the elements are not in sorted order, it will take O(n) time for worst case time complexity.

→ In question, they are not mentioned about elements are sorted or unsorted. So, worst case we have to consider unsorted elements.

→ All operations(i.e. Search,update and delete) will take O(n).

→ In question, they are not mentioned about elements are sorted or unsorted. So, worst case we have to consider unsorted elements.

→ All operations(i.e. Search,update and delete) will take O(n).

Subscribe

Login

0 Comments