Skip to content

Instantly share code, notes, and snippets.

@ehudon
ehudon / Depth first search algorithm in Java.md
Last active October 30, 2022 20:08
Depth first search algorithm in Java

Depth first search algorithm in Java

Sample Data

For this gist, let’s consider this tree as our data.

               A <--------- |
               |            |
           B <- -> C        |
           |       |        |