GATE 2022: Subject Revision Quiz-2
Attempt now to get your rank among 139 students!
f(n) =? (f(n)^2)
i) Ideal for sorted array
ii) Works best when input is not almost sorted.
iii) worst case is O(n2)
iv) Better than insertion sort for every type of input.
A- Quick Sort
B- Dijkstra’s Algorithm
C- Floyd Warshall Algorithm
D- Connected Components
1- Dynamic Programming
2- Greedy Method
3- Depth First Search
4- Divide and Conquer
for(i=1 ;i<=n; i= 20*i)
for(j=1 j<=n; j++)
Assuming "n" to be a prime number , find the Time Complexity of the code.
structure. What is the running time of insertVertex method and the removeVertex method respectively?
Consider an open address hash table with uniform hashing. Out of 10 locations, 8 are occupied. What are the expected number of probes in an unsuccessful and successful search respectively?
Case 1: Choosing middle element as pivot.
Case 2: Choosing pivot element as element initially followed by element, followed by element of array A and so on.
Case 3: Choosing median element as pivot.
Case 4: Choosing the pivot element randomly from the array A.
Case 5: Choosing pivot such that the array is partioned into almost two equal subarrays.
After applying Huffman coding algorithm, the weighted external path length is _________.
Statement Both Quadratic probing and double hashing technique resolve the problem of secondary clustering.
Statement 2. While dealing with set of strings, multidimensional arrays are space efficient than the array of pointers.
Statement 3. Initialization of an external variable goes only with the definition.
Number of statements that are correct ____.
I. Merge Sort procedure is bottom-up
II. Insertion Sort is efficient for sorting a small number of elements
III. Output is also called the instance of a program
Find the number of correct statements from the above statements.
Let the initial instant be T= 0 Let the times of visit of vertices 2, 3, 4, 5, 6 and 7 from T = 0 be T2, T3, T4, T5, T6 and T7 We wish to minimize the sum of T2, T3, T4, T5, T6 and T7 Find out the minimum possible sum of the given times [Note: Each edge cost is nothing but travel time]__________
- 139 attempts
- 0 upvotes
- 1 comment