Learn and practice Aptitude questions and answers with explanation for interview, competitive exam (Pariksha Corner )

Algorithms And Data Structures



Thursday, January 23, 2020

If the access time of a symbol table can be made logarithmic

If the access time of a symbol table can be made logarithmic, it greatly reduces the search time. This can be implemented by
Aa linear list
Ba search tree
Chashing mechanism
Dself-organisation chart
View Answer

The following graph is reduced to its minimum spanning tree

The following graph is reduced to its minimum spanning tree using prim's method. Indicate the sequence in which the nodes get included
A1, 2, 5, 6, 4, 3
B1, 2, 6, 4, 5, 3
C1, 2,.3, 6, 4, 5
D1, 2, 6, 3, 4, 5
View Answer

Given the set of keys ( 40, 80, 35, 90, 45, 50, 70 ), which

Given the set of keys ( 40, 80, 35, 90, 45, 50, 70 ), which of the following represents a heap ? ( Each pair of parentheses indicate nodes at one level, left child first)
A( ( 90 ) ( 40 - 80 ) ( ( 35 - 70 ) - ( 45 - 50 ) ) )
B( ( 80 ) ( 90 - 70 ) ( ( 40 - 45 ) ( 35 - 50 ) ) )
C( ( 90 ) ( 80 - 70 ) ( ( 40 - 45 ) ( 35 - 50 ) ) )
D( ( 70 ) ( 80 - 90 ) ( ( 50 - 45 ) ( 40 - 35 ) ) )
View Answer

Wednesday, January 22, 2020

Match the methodology of List-A with the application of List

Match the methodology of List-A with the application of List-B :
Aa->III b->I c->IV d->II
Ba->IV b->III c->II d->I
Ca->III b->IV c->I d->II
Da->III b->II c->I d->IV
View Answer

Given two problems X and Y, Y is NP complete and X reduces

Given two problems X and Y, Y is NP complete and X reduces to Y in polynomial time. Which of the following is a valid statement ?
AX is NP hard
BX is NP complete
CX is an NP, but not necessarily NP complete
DIf X can be solved in polynomial time, so also can Y.
View Answer

Categories