The first principles of any DFS algorithms.
How to nail DFS algorithm interviews with both iteration and recursion
Published in
5 min readFeb 7, 2022
When it comes to coding, I like to find patterns. Patterns reveal first principles, and approaching any question from first principle thinking leads to better clarity.
Here are some first principles that often come up during coding interviews.