Explanation of Algorithm for finding articulation points or cut vertices of a graph

Finding articulation vertices is an application of DFS. In a nutshell, Apply DFS on a graph. Get the DFS tree. A node which is visited earlier is a “parent” of those nodes which are reached by it and visited later. If any child of a node does not have a path to any of the … Read more

How to implement depth first search for graph with a non-recursive approach

A DFS without recursion is basically the same as BFS – but use a stack instead of a queue as the data structure. The thread Iterative DFS vs Recursive DFS and different elements order handles with both approaches and the difference between them (and there is! you will not traverse the nodes in the same … Read more

Iterative deepening vs depth-first search

In a depth-first search, you begin at some node in the graph and continuously explore deeper and deeper into the graph while you can find new nodes that you haven’t yet reached (or until you find the solution). Any time the DFS runs out of moves, it backtracks to the latest point where it could … Read more

Detecting cycles in a graph using DFS: 2 different approaches and what’s the difference

Answering my question: The graph has a cycle if and only if there exists a back edge. A back edge is an edge that is from a node to itself (selfloop) or one of its ancestor in the tree produced by DFS forming a cycle. Both approaches above actually mean the same. However, this method … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)