CS FundamentalsVery hardCognizant · Capgemini pattern
Run Dijkstra's algorithm on this undirected weighted graph (node-node:weight): N1-N2:2, N1-N3:4, N2-N3:1, N2-N4:7, N3-N5:3, N4-N6:1, N5-N4:2, N5-N6:5. Starting from N1, what is the shortest-path distance to N6?
- A. 12
- B. 9
- C. 10
- D. 7
Correct answer: B. 9
Dijkstra from N1 settles nodes in increasing order of distance; the shortest distance found to N6 is 9.
More Computer Networks questions
- A CDN uses DNS-based load balancing: the authoritative server returns a different A record depending on the resolver's apparent location…
- In the OSI model, which layer decides the path a packet takes from one network to another?
- Which protocol finds the MAC address of a host when only its IPv4 address is known?
- What is the well-known TCP port for HTTPS?
- The protocol data unit handled at the data link layer is called a:
- Which device forwards traffic inside a LAN by looking up destination MAC addresses in a table?