All challenges
Multiple ChoiceIntermediate 30s

Depth-First Search (DFS)

DFS explores a graph:
Options
  1. 1By always processing the smallest-weight edge first and expanding outward from it
  2. 2By visiting nodes level by level using a queue while tracking their hop distances
  3. 3By visiting the nodes strictly in the alphabetical order of their assigned labels
  4. 4Going as deep as possible along a branch before backtracking, typically using recursion or a stack

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle