Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 6 MCQs Graphs

CSE205 — Data Structures And Algorithms 50 questions. Pick an option to check it.

Read the notes

0 of 50 answered 0 right 0 wrong , 50 left

  1. Question 1 of 50

    Which data structure is primarily used to implement Breadth-First Search (BFS)?

  2. Question 2 of 50

    Which data structure is primarily used to implement Depth-First Search (DFS)?

  3. Question 3 of 50

    What is the time complexity of BFS for a graph represented using an adjacency list with V vertices and E edges?

  4. Question 4 of 50

    What is the time complexity of DFS for a graph represented using an adjacency matrix with V vertices?

  5. Question 5 of 50

    Which algorithm is best suited for finding the shortest path in an unweighted graph?

  6. Question 6 of 50

    Dijkstra’s Algorithm is based on which algorithmic paradigm?

  7. Question 7 of 50

    What is the main limitation of Dijkstra’s Algorithm?

  8. Question 8 of 50

    What is the time complexity of Dijkstra’s Algorithm using a binary heap (priority queue)?

  9. Question 9 of 50

    Which algorithm can detect a negative weight cycle in a graph?

  10. Question 10 of 50

    How many iterations does the Bellman-Ford algorithm run to guarantee shortest paths in a graph with V vertices?

  11. Question 11 of 50

    What is the time complexity of the Bellman-Ford algorithm?

  12. Question 12 of 50

    The Floyd Warshall algorithm is used to solve which problem?

  13. Question 13 of 50

    What is the time complexity of the Floyd Warshall algorithm?

  14. Question 14 of 50

    Floyd Warshall algorithm uses which algorithmic paradigm?

  15. Question 15 of 50

    In the relaxation step if (d[u] + c(u, v) < d[v]), what does d[v] represent?

  16. Question 16 of 50

    Which traversal is most appropriate for topological sorting?

  17. Question 17 of 50

    If a graph is disconnected, which traversal will fail to visit all vertices if started from a single source?

  18. Question 18 of 50

    In Dijkstra's algorithm, what is the initial distance value assigned to the source vertex?

  19. Question 19 of 50

    What does A[i][j] represent in the final matrix of the Floyd Warshall algorithm?

  20. Question 20 of 50

    Which algorithm is strictly faster for sparse graphs when finding the single-source shortest path with non-negative weights?

  21. Question 21 of 50

    During DFS, if we encounter an edge to a vertex that is currently in the recursion stack, what does this indicate?

  22. Question 22 of 50

    Bellman-Ford works on which type of graphs?

  23. Question 23 of 50

    What is the space complexity of the Floyd Warshall algorithm?

  24. Question 24 of 50

    Which algorithm calculates the shortest path from a single source to all other vertices?

  25. Question 25 of 50

    In BFS, nodes are visited in an order based on their:

  26. Question 26 of 50

    In the context of Bellman-Ford, what happens if the graph contains a negative weight cycle?

  27. Question 27 of 50

    The recurrence relation D[i][j] = min(D[i][j], D[i][k] + D[k][j]) belongs to which algorithm?

  28. Question 28 of 50

    Which of the following is an application of DFS?

  29. Question 29 of 50

    If we use an adjacency matrix to represent a graph for Dijkstra's algorithm, the time complexity becomes:

  30. Question 30 of 50

    What is the maximum number of edges in a connected undirected graph with V vertices?

  31. Question 31 of 50

    Which traversal algorithm uses less memory (space complexity) for a very deep but narrow tree?

  32. Question 32 of 50

    Which of the following algorithms can handle directed graphs with negative edges?

  33. Question 33 of 50

    What is the initial state of the distance array in Dijkstra's algorithm for all vertices except the source?

  34. Question 34 of 50

    In a Dense Graph (where E is close to V^2), which algorithm is generally preferred for Single Source Shortest Path?

  35. Question 35 of 50

    A 'Cross Edge' is a concept encountered in which algorithm?

  36. Question 36 of 50

    To reconstruct the shortest path after running Dijkstra’s or Bellman-Ford, what additional information must be stored?

  37. Question 37 of 50

    Can Floyd Warshall algorithm detect negative cycles?

  38. Question 38 of 50

    Which algorithm calculates the Transitive Closure of a graph?

  39. Question 39 of 50

    In BFS, what are the colors usually associated with nodes during processing?

  40. Question 40 of 50

    Dijkstra's algorithm can be implemented efficiently using:

  41. Question 41 of 50

    If you need to find the shortest path between two specific nodes (u, v), which algorithm is typically stopped early?

  42. Question 42 of 50

    Which algorithm is capable of handling a graph with cycles?

  43. Question 43 of 50

    The process of updating the distance of a vertex v using a neighbor u is called:

  44. Question 44 of 50

    What is the minimum number of edges required to connect a graph with N vertices?

  45. Question 45 of 50

    Which algorithm is most sensitive to the order of edges processed if not using a specific data structure?

  46. Question 46 of 50

    In a graph where edge weights represent probabilities of success, how do we transform the problem to use Shortest Path algorithms?

  47. Question 47 of 50

    Breadth-First Search is equivalent to Level-Order Traversal in which data structure?

  48. Question 48 of 50

    Which graph representation is most space-efficient for sparse graphs?

  49. Question 49 of 50

    In the classification of edges in DFS, what is a 'Forward Edge'?

  50. Question 50 of 50

    Why is Bellman-Ford not preferred over Dijkstra for graphs with non-negative weights?

That's unit 6

Answer a few questions and your score shows up here.