This section contains more frequently asked Data Structure and Algorithms Objective Questions Answers in the various University level and competitive examinations.

PRACTICE IT NOW TO SHARPEN YOUR CONCEPT AND KNOWLEDGE

view hide answers

1. Which is not in general criteria of algorithm

  • Input
  • Output
  • Time complexity
  • Effectiveness

2. Time complexity of given algorithm Algorithm Display(A) { S:=0.0; For i:=0 to n-1 { S:=S+A[i]; Return S; } }

  • 4n+4
  • 4n^2+4
  • 2n^2+2n+2
  • 4n+4

3. Time complexity of given algorithm AlgorithmSum(A,S) { for i:=1 to n-1 { for j:=2 to n-1 { S:=S+i+j; return S; } } }

  •  6n^2-14n+4
  • 4n^2+6n+12
  • 6n^2+14n+10
  • 6n^2-14n+10

4. kruskal algorithm is based on ___________method

  • Divide and conquer method
  • Greedy method
  • Dynamic programming
  • Branch and bound

5. Prims algorithm is based on _____________ method

  • Divide and conquer method
  • Dynamic programming
  • Greedy method
  • Branch and bound

6. The output of Kruskal and Prims algorithm is ________________

  • Maximum spanning tree
  • Spanning tree
  • Minimum spanning tree
  • None of these

7. which is not feasible solution in the case of job sequence problem item : 1 2 3 4 profit : 100 10 15 27 deadline : 2 1 2 1

  • (1,4)
  • (4,3)
  • (2,4)
  • (1,2)

8. which isoptimal value in the case of job sequence problem item : 1 2 3 4 5 profit : 20 15 10 5 1 deadline : 2 2 3 3 3

  • (1,3,4)
  • (4,2,3)
  • (1,2,4)
  • (1,5,2)

9. which is optimal value in the case of job sequence problem item : 1 2 3 4 5 6 7 profit : 3 5 20 18 1 6 30 deadline : 1 3 4 3 2 1 2

  • (1,5,6,4)
  • (7,6,4,3)
  • (2,3,1,7)
  • (1,2,3,4)
Share with : Share on Linkedin Share on Twitter Share on WhatsApp Share on Facebook