Header Ads Widget

Algorithm multiple choice questions part-7

 Graph MCQs :-

  1. What is Dynamic Programming? a) An algorithmic paradigm that solves a complex problem by breaking it into subproblems b) A method of randomly trying different solutions until finding the correct one c) An algorithm that sorts elements in an array d) A method for finding the closest pair of points in a set of points in x-y plane

Answer: a) An algorithmic paradigm that solves a complex problem by breaking it into subproblems

  1. What is the main reason for using Dynamic Programming? a) To break a problem into smaller subproblems b) To try different solutions until finding the correct one c) To sort elements in an array d) To draw a graph

Answer: a) To break a problem into smaller subproblems

  1. Which property of Dynamic Programming refers to the fact that solutions of the same subproblem are needed again and again? a) Optimal Substructure b) Memoization c) Tabulation d) Overlapping Subproblems

Answer: d) Overlapping Subproblems

  1. Which Dynamic Programming approach starts with the main problem and breaks it down into smaller subproblems until the solution is found? a) Memoization (Top Down) b) Tabulation (Bottom Up) c) Backtracking d) None of the above

Answer: a) Memoization (Top Down)

  1. Which Dynamic Programming approach starts with the smallest subproblems and builds up to the solution of the main problem? a) Memoization (Top Down) b) Tabulation (Bottom Up) c) Backtracking d) None of the above

Answer: b) Tabulation (Bottom Up)

  1. What is the name of the algorithm that uses Dynamic Programming to find the shortest path between two vertices in a graph? a) Dijkstra's Algorithm b) Prim's Algorithm c) Bellman-Ford Algorithm d) Kruskal's Algorithm

Answer: c) Bellman-Ford Algorithm

  1. What is the name of the algorithm that uses Dynamic Programming to find the all-pairs shortest path in a graph? a) Floyd-Warshall Algorithm b) Bellman-Ford Algorithm c) Dijkstra's Algorithm d) Kruskal's Algorithm

Answer: a) Floyd-Warshall Algorithm

  1. What is the name of the Dynamic Programming problem that involves finding the longest increasing subsequence in an array? a) Longest Common Subsequence b) Knapsack Problem c) Longest Increasing Subsequence d) Traveling Salesman Problem

Answer: c) Longest Increasing Subsequence

  1. What is the name of the Dynamic Programming problem that involves finding the minimum cost path between two vertices in a weighted graph? a) Knapsack Problem b) Shortest Path Problem c) Longest Common Subsequence d) Traveling Salesman Problem

Answer: b) Shortest Path Problem

  1. What is the name of the Dynamic Programming problem that involves finding the maximum value of items that can be put into a knapsack of capacity W? a) Longest Common Subsequence b) Knapsack Problem c) Longest Increasing Subsequence d) Shortest Path Problem

Answer: b) Knapsack Problem

  1. Which algorithm uses Dynamic Programming to solve the Knapsack Problem? a) Floyd-Warshall Algorithm b) Bellman-Ford Algorithm c) Dijkstra's Algorithm d) None of the above

Answer: d) None of the above (The Knapsack Problem has its own Dynamic Programming algorithm)


  Pre  👈                                👉  Next  

 Similar posts:-

  1. C-programming MCQs part-1
  2. C-programming MCQs part-2
  3. C-programming MCQs part-3
  4. C-programming MCQs part-4
  5. C-programming MCQs part-5
  6. C-programming MCQs part-6
  7. COA MCQs part-1
  8. COA MCQs part-2
  9. COA MCQs part-3
  10. COA MCQs part-4

EasyCodingZone

Must check this :-

  1. Microprocessor 8085 MCQs part-1
  2. Microprocessor 8085 MCQs part-2
  3. Microprocessor 8085 MCQs part-3
  4. CSS MCQs part-1
  5. CSS MCQs part-2
  6. CSS MCQs part-3
  7. CSS MCQs part-4
  8. CSS MCQs part-5
  9. Engineering Mathematics -II MCQs part-1
  10. Engineering Mathematics -II MCQs part-2
  11. Engineering Mathematics -II MCQs part-3
  12. Engineering Mathematics -II MCQs part-4
  13. Engineering Mathematics -II MCQs part-5
  14. Operating system MCQs part-1
  15. Operating system MCQs part-2
  16. Operating system MCQs part-3
  17. Operating system MCQs part-4
  18. Operating system MCQs part-5