Data Structures & AlgorithmsModerateTCS NQT · Graphs

In the directed graph with edges S->A (4), S->B (1), B->A (2), A->C (5), B->C (8), B->D (10), C->D (2), C->T (6), D->T (3), what is the shortest distance from S to T?

  1. A. 15
  2. B. 13
  3. C. 11
  4. D. 17

Correct answer: B. 13

Best route S->B->A->C->D->T costs 1 + 2 + 5 + 2 + 3 = 13.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic