info@avatto.com
+91-9920808017
86. The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are:
Θ(n log n), Θ(n log n), and Θ(n2)
Θ(n2), Θ(n2), and Θ(n log n)
Θ(n2), Θ(n log n), and Θ(n log n)
Θ(n2), Θ(n log n), and Θ(n2)
Your email address will not be published. Required fields are marked *
Report
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Comment
87. Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in the ascending order, which of the following are TRUE? I. Quicksort runs in Θ(n2) time II. Bubblesort runs in Θ(n2) time III. Mergesort runs in Θ(n) time IV. Insertion sort runs in Θ(n) time
I and II only
I and III only
II and IV only
I and IV only
88. In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.
1-C, 2-A, 3-B, 4-D
1-B, 2-D, 3-C, 4-A
1-C, 2-D, 3-A, 4-B
1-B, 2-A, 3-C, 4-D
89. In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time complexity, by
Dijkstra's algorithm starting from S
Warshall's algorithm
performing a DFS starting from S
performing a BFS starting from S
90. Consider n jobs J1, J2,..., Jn such that job Ji has execution time ti and a non-negative integer weight wi. The weighted mean completion time of the jobs is defined to be where Ti is the completion time of job Ji. Assuming that there is only one processor available, in what order must the jobs be executed in order to minimize the weighted mean completion time of the jobs?
Non-decreasing order of ti
Non-increasing order of wi
Non-increasing order of wi ti
Non-increasing order of wi/ti
Login with Facebook
Login with Google
Forgot your password?
Lost your password? Please enter your email address. You will receive mail with link to set new password.
Back to login