AllInfoHub Logo

AllInfoHub – MCQ Practice

Data Structures and Algorithms – Multiple Choice Questions (MCQs)

  1. 61. What is dynamic programming?

    • A. An algorithmic technique for solving complex problems by breaking them down into simpler overlapping subproblems
    • B. An algorithmic technique for solving problems by making locally optimal choices at each step
    • C. A data structure used for storing dynamic data
    • D. A programming paradigm focused on data flow
  2. 62. Which of the following is a characteristic of dynamic programming?

    • A. Optimal substructure
    • B. Greedy choice property
    • C. Divide and conquer
    • D. Recursion without memoization
  3. 63. What is a greedy algorithm?

    • A. An algorithmic technique that makes the locally optimal choice at each step with the hope of finding a global optimum
    • B. An algorithmic technique that explores all possible solutions
    • C. An algorithmic technique based on recursion
    • D. A data structure used for greedy approaches
  4. 64. Dijkstra's algorithm is an example of a:

    • A. Sorting algorithm
    • B. Searching algorithm
    • C. Greedy algorithm
    • D. Dynamic programming algorithm
  5. 65. Bellman-Ford algorithm can handle graphs with:

    • A. Only positive edge weights
    • B. Negative edge weights
    • C. No weights
    • D. Only directed edges
  6. 66. Floyd-Warshall algorithm is used to find:

    • A. Single-source shortest paths
    • B. All-pairs shortest paths
    • C. Minimum spanning tree
    • D. Longest path
  7. 67. What is a minimum spanning tree (MST)?

    • A. A subgraph that connects all vertices together
    • B. without any cycles and with the minimum possible total edge weight
    • C. A tree that spans all vertices with the maximum edge weight
    • D. A subgraph with the fewest number of edges
  8. 68.

    • A.
    • B.
    • C.
    • D.