CS FundamentalsVery hardWipro · Accenture pattern
Run Dijkstra's algorithm on this undirected weighted graph (edges given as node-node:weight): A-B:1, A-C:4, B-C:2, B-D:6, C-D:1. Starting from A, what is the shortest-path distance to D?
- A. 3
- B. 6
- C. 4
- D. 5
Correct answer: C. 4
Dijkstra from A settles nodes in increasing distance order; the shortest-path distance it finds to D is 4.
More Computer Networks questions
- In a TLS 1.2 full handshake (no session resumption), put these messages in the order they are sent.
- Compared with TLS 1.2's full handshake, how many round trips does a fresh TLS 1.3 handshake need before application data can be sent, and…
- During a TLS handshake, which message proves the server actually possesses the private key matching its certificate (rather than just…
- A client reconnects to a server it talked to recently and both support TLS session resumption via session tickets. What changes in the…
- An HTTPS client fails certificate validation because the chain presented by the server is missing an intermediate CA certificate, even…
- A stop-and-wait link sends frames of 1000 bits over a channel of bandwidth 10,00,000 bps with one-way propagation delay 10 ms. What is the…