GATE 2023: Subject Revision Quiz-2
Attempt now to get your rank among 154 students!
Question 1
f(n) =? (f(n)^2)
Question 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.
Question 3
Question 4
Question 5
Match- II
A- Quick Sort
B- Dijkstra’s Algorithm
C- Floyd Warshall Algorithm
D- Connected Components
Match -II
1- Dynamic Programming
2- Greedy Method
3- Depth First Search
4- Divide and Conquer
Question 6
main()
{
for(i=1 ;i<=n; i= 20*i)
{
for(j=1 j<=n; j++)
{
if(n%j==0)
{
k=1
while(k<=n)
{
a=b+c;
k=k+1;
}
}
}
}
}
Assuming "n" to be a prime number , find the Time Complexity of the code?
Question 7
structure. What is the running time of insertVertex method and the removeVertex method respectively?
Question 8
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?
Question 9
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.
Question 10
After applying Huffman coding algorithm, the weighted external path length is _________.
Question 11
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 ____.
Question 12
Question 13
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.
Question 14
Question 15
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]__________
- 154 attempts
- 0 upvotes
- 1 comment
Tags :
GATE & PSU CSGeneral