Which of the following algorithm can be used to detect a cycle in a singly linked list?
A. Simplex algorithm
B. DSW algorithm
C. Floyd's algorithm
D. Aging algorithm
Select an option to see the answer and solution.
Which of the following sorting algorithm has best case time complexity of O(n2 )?
A. bubble sort
B. selection sort
C. insertion sort
D. stupid sort
Select an option to see the answer and solution.
What will be the best case time complexity of recursive selection sort?
A. O(n)
B. O(n2 )
C. O(log n)
D. O(n log n)
Select an option to see the answer and solution.
What is the running time of Chan's algorithm?
A. O(log n)
B. O(n log n)
C. O(n log h)
D. O(log h)
Select an option to see the answer and solution.
Which of the following is an application of Euler's totient function?
A. Pre-order traversal
B. To find the number of generators in a cyclic group
C. Number of possible BST in a tree
D. Detecting cycle in a graph
Select an option to see the answer and solution.
Which of the following statement is not related to quickhull algorithm?
A. finding points with minimum and maximum coordinates
B. dividing the subset of points by a line
C. eliminating points within a formed triangle
D. finding the shortest distance between two points
Select an option to see the answer and solution.
Which of the following cipher makes use of linear algebra for encrypting data?
A. polybius square cipher
B. affine cipher
C. caesar cipher
D. rail fence cipher
Select an option to see the answer and solution.
Bipartite graph belongs to class 1 graphs.
Select an option to see the answer and solution.
What is the running time of Hershberger algorithm?
A. O(log n)
B. O(n log n)
C. O(n log h)
D. O(log h)
Select an option to see the answer and solution.
Which of the following refers to the circuit that uses every edge exactly once, also starts and ends at the same vertex?
A. Hamiltonian circuit
B. Eulerian path
C. Eulerian tour
D. Hamiltonian path
Select an option to see the answer and solution.
Consider a reference string:
7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 of frame size 4. Using FIFO algorithm, determine the number of page faults.
Select an option to see the answer and solution.
What will be the co-ordinates of foot of perpendicular line drawn from the point (-1,3) to the line 3x-4y-16=0?
A. (1/5,2/5)
B. (2/25,5/25)
C. (68/25,-49/25)
D. (-49/25,68/25)
Select an option to see the answer and solution.
What is the purpose of using function srand()?
A. to set the seed of rand() function
B. to generate random numbers
C. to enable rand() function
D. to improve efficiency of rand()
Select an option to see the answer and solution.
Problems that cannot be solved by any algorithm are called?
A. tractable problems
B. intractable problems
C. undecidable problems
D. decidable problems
Select an option to see the answer and solution.
Least recently used cache has the space complexity of O(n).
Select an option to see the answer and solution.
The pseudocode for the independent set problem is given below. Which of the following gives the time complexity for it?
Independent (G = (V, E))
{
temp=true
for every {u, v} in the subset
{
check if they have any edge between them
if edge exists, then set temp as false and break
}
If temp is true
correct result
else
incorrect
}A. O(V + E)
B. O(V)
C. O(V log V)
D. O(V log E)
Select an option to see the answer and solution.
When is a graph said to be bipartite?
A. If it can be divided into two independent sets A and B such that each edge connects a vertex from to A to B
B. If the graph is connected and it has odd number of vertices
C. If the graph is disconnected
D. If the graph has at least n/2 vertices whose degree is greater than n/2
Select an option to see the answer and solution.
The resultant vector from the cross product of two vectors is . . . . . . . .
A. perpendicular to any one of the two vectors involved in cross product
B. perpendicular to the plane containing both vectors
C. parallel to to any one of the two vectors involved in cross product
D. parallel to the plane containing both vectors
Select an option to see the answer and solution.
Recursive selection sort is a comparison based sort.
Select an option to see the answer and solution.
Space complexity of recursive solution of tower of hanoi puzzle is . . . . . . . .
A. O(1)
B. O(n)
C. O(log n)
D. O(n log n)
Select an option to see the answer and solution.