Find the Redundant Connection

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • medium
  • Pro

A network started as a tree, then one extra connection was added, creating exactly one cycle. Given the connections in the order they were added, find one you can remove to make it a tree again, and explain how union-find helps.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →