MCQOPTIONS
Saved Bookmarks
This section includes 13 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is the value of the sum of the minimum in-degree and maximum out-degree of an Directed Acyclic Graph? |
| A. | Depends on a Graph |
| B. | Will always be zero |
| C. | Will always be greater than zero |
| D. | May be zero or greater than zero |
| Answer» C. Will always be greater than zero | |
| 2. |
For any two different vertices u and v of an Acyclic Directed Graph if v is reachable from u, u is also reachable from v? |
| A. | True |
| B. | False |
| Answer» C. | |
| 3. |
Which of the given statement is true? |
| A. | All the Cyclic Directed Graphs have topological sortings |
| B. | All the Acyclic Directed Graphs have topological sortings |
| C. | All Directed Graphs have topological sortings |
| D. | All the cyclic directed graphs hace non topological sortings |
| Answer» E. | |
| 4. |
What would be the output of the following C++ program if the given input is |
| A. | 0 2 3 1 4 |
| B. | 0 3 2 4 1 |
| C. | 0 2 3 4 1 |
| D. | 0 3 2 1 4View Answer |
| Answer» C. 0 2 3 4 1 | |
| 5. |
What sequence would the BFS traversal of the given graph yield? |
| A. | A F D B C E |
| B. | C B A F E D |
| C. | A B D C E F |
| D. | E F D C B A |
| Answer» D. E F D C B A | |
| 6. |
Which of the following is not a topological sorting of the given graph? |
| A. | A B C D E F |
| B. | A B F E D C |
| C. | A B E C F D |
| D. | A B C D F E |
| Answer» E. | |
| 7. |
WHICH_OF_THE_GIVEN_STATEMENT_IS_TRUE??$ |
| A. | All the Cyclic Directed Graphs have topological sortings |
| B. | All the Acyclic Directed Graphs have topological sortings |
| C. | All Directed Graphs have topological sortings |
| D. | None of the given statements is true |
| Answer» C. All Directed Graphs have topological sortings | |
| 8. |
For_any_two_different_vertices_u_and_v_of_an_Acyclic_Directed_Graph_if_v_is_reachable_from_u,_u_is_also_reachable_from_v?$ |
| A. | True |
| B. | False |
| Answer» C. | |
| 9. |
0 2 3 1 ? |
| A. | 0 3 2 4 1 |
| B. | 0 2 3 4 1 |
| C. | 0 3 2 1 4 |
| Answer» B. 0 2 3 4 1 | |
| 10. |
If there are more than 1 topological sorting of a DAG is possible, which of the following is true. |
| A. | Many Hamiltonian paths are possible |
| B. | No Hamiltonian path is possible |
| C. | Exactly 1 Hamiltonian path is possible |
| D. | Given information is insufficient to comment anything |
| Answer» C. Exactly 1 Hamiltonian path is possible | |
| 11. |
The topological sorting of any DAG can be done in ________ time. |
| A. | cubic |
| B. | quadratic |
| C. | linear |
| D. | logarithmic |
| Answer» D. logarithmic | |
| 12. |
With V(greater than 1) vertices, how many edges at most can a Directed Acyclic Graph possess? |
| A. | (V*(V-1))/2 |
| B. | (V*(V+1))/2 |
| C. | (V+1)C2 |
| D. | (V-1)C2 |
| Answer» B. (V*(V+1))/2 | |
| 13. |
Every Directed Acyclic Graph has at least one sink vertex. |
| A. | True |
| B. | False |
| Answer» B. False | |