Question: Unless otherwise stated give O0 time complexity for the worst case. Answers should be as simple and precise as possible to attract maximum marks. a.

Unless otherwise stated give "O0" time complexity for the worst case. Answers should be as simple and precise as possible to attract maximum marks. a. What is the complexity of insertion sort? b. What is the complexity of quicksort? c. What is the complexity of binary search (for arrays)? d. What is the complexity of simple binary search tree insertion? e. What is the complexity of 2-3 tree insertion? f. What is the complexity of insertion into a priority queue implemented as a sorted array? g. What is the complexity of quicksort for a file where all elements are equal? h. What is the complexity of selection sort for a file where all elements are equal? i. What is the complexity of Warshall's algorithm for sparse graphs? j. What is the best case complexity of merge sort? k. What is the space complexity of the adjacency list representation of graphs? 1. If the running time of an algorith algorithm is expressed as the recurrence CN-: CN/2 + 1, C,-1, what is the complexity? m. Fill in the blanks to define "Big-Oh": g(n)-O(f(n)) if and only if n. What are the main operations supported by a priority queue ADT? o. Give two axioms which define the behaviour of the pop operation of stacks p. Which of the following algorithms are based on "divide and conquer": Warshall's al- gorithm, Prim's algorithm, selection sort, quick sort, merge sort, distribution count- ing, heap sort, Horner's rule. depth-first search, adjacency list, balanced tree, spanning tree. same complexity, write- between them, otherwise write
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
