Skip to content

wheresmyinternet

bradendubois edited this page Nov 24, 2021 · 11 revisions

Where's My Internet??

ID: wheresmyinternet

Difficulty: 3.2

CPU Time: 1 second

Memory: 1024 MB

Solution

We're finding the reach of the network, which can be visualized as a graph. A pair of houses is essentially an edge; create a graph with the connection between two houses as an edge, and do a DFS traversal from house 1, marking any visited houses.

Clone this wiki locally