[Solution]Problem 82: Find all the Bridges in a graph [Mozilla]
Graph Traversal, Graph Theory,DFS.
Hey, it’s your favorite cult leader here 🐱👤
On Thursdays, I will send you a problem + its solution. These solutions will help you reinforce your fundamental concepts, improve your problem-solving, and kill those Leetcode-Style Interviews. 🔥🔥💹💹
To get access to all my articles and support my crippling chocolate milk addiction, consider subscribing if you haven’t already!
p.s. you can learn more about the paid plan here.
There’s a good chance some of you have been laid off/or are just generally struggling to find more work (I know it’s been rough for me). To help a little, I will be sharing some promising work that I come across that you can apply to.
The 2 Billion USD healthcare company, Hims&Hers is hiring a Senior Machine Learning Engineer (apply here). Here is some important information-
Base Salary- $125,000 - $175,000
Even though the JD is very machine learning heavy, they are not looking for AI-heavy devs (sadly for me 😢😢). Instead, they want software engineers with a lot of experience in backend engineering, who have some idea of Machine Learning.
The recruiter was kind enough to share the resume of an ideal candidate (one of their current employees) with me. You’ll find it here.
You can contact the recruiter- Nick- on LinkedIn here or through his email- nflood@forhims.com
Feel free to reach out to him for any information, or just apply to the role at the link shared. Now onto the solution.
Problem
A bridge in a connected (undirected) graph is an edge that, if removed, causes the graph to become disconnected. Find all the bridges in a graph. Assume that the graph is finite
The above image is a good illustration of what bridges look like. For a formal definition, check out their Wikipedia.
Keep reading with a 7-day free trial
Subscribe to Technology Made Simple to keep reading this post and get 7 days of free access to the full post archives.