PART 3 / LESSON 20 · Overview free · interactive lesson in the full course

Weighted graphs and shortest paths

Compare path cost with hop count, and understand the assumptions of weighted graph algorithms.

View lesson accessAll lessons

What the lesson covers

The course lesson is called The shortest route through the mesh. The mesh routes by hop count, and the noisy link in the middle keeps dropping packets. Each link needs a cost, and the route needs to minimise the total cost, not the number of hops.

Before you start

Question to think about: What changes if the graph contains an edge outside the algorithm's supported cost range?

Preparation exercise: Create a small fictional network where the fewest-hop route and the lowest-cost route differ.

This is an original public study prompt, not the paid lesson or its solution. The interactive course contains the walkthroughs, labs, exercises and recaps.

Read the free embedded C articles for additional practice.

Test your understanding

Practice free firmware interview questions and mock interviews · Assess your readiness