Index

Module 08 · DSAWorked problems, in English

Clinic #26: Redundant Connection

Graphs
Graphs · Open board

Dots and the lines between them, and in its last panel the tool this clinic is about: every dot points at another dot, the one at the top of each chain names the group, and two short questions (“walk up to the top”, “point one top at the other”) answer whether two dots are already joined.

Before you start. A graph is a set of dots joined by lines; Graphs (BFS, DFS, Dijkstra, topological sort) builds it from scratch, and here the dots are houses and the lines are cables. Engineers write the cost of reading every item in a list once as O(n), said “order n”: double the list, double the work. A full walk of the list for every item is O(n²): double the list, four times the work, and at ten thousand items a hundred million steps.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

Every find walks a chain of houses up to the root. In the worst order, how long can that chain get, and what keeps it short?

Drag Cables joined to the end, then switch The habits and watch Tallest chain fall from 31 to 5.

Open The short chains →

Review DSA →

Saved in this browser, and to your account when you sign in.