How to Use Depth First Search (DFS) to Help Solve Life’s Problems
Marrying computer science with life-advice
Until a couple of months ago, becoming single was something I dreaded. I’d mentally convinced myself that I needed to always be dating or seeing women.
If neither happened, I would descend into a self-worth-demeaning loop of anxiety. And only a successful cold approach or a few Tinder matches would help me feel better.
I knew my self-esteem had nothing to do with my dating status, but I couldn’t internalize that fact — a classic case of the G.I Joe fallacy.
When my frustration finally boiled over, I sat down in solitude and within 30 minutes of mulling, got to the root — Social media FOMO and a desire to overcompensate for my bullied past.
Having deleted Instagram and decimated my desire for validation, this problem has disappeared.
But this also left me with a potent technique to get to the root of any problem and solve it — and it’s eerily similar to a computer science algorithm.
Depth First Search
Graphs are collections of dots (called vertices) connected by lines called edges. Below are a few examples: