About 138,000 results
Open links in new tab
  1. Depth First Search or DFS for a Graph - GeeksforGeeks

    Mar 29, 2025 · In Depth First Search (or DFS) for a graph, we traverse all adjacent vertices one by one. When we traverse an adjacent vertex, we completely finish the traversal of all vertices reachable through that adjacent vertex. This is similar to a tree, where we first completely traverse the left subtree and then move to the right subtree.

  2. Graph traversal - Wikipedia

    In computer science, graph traversal (also known as graph search) refers to the process of visiting (checking and/or updating) each vertex in a graph. Such traversals are classified by the order in which the vertices are visited. Tree traversal is a special case of graph traversal.

  3. Depth First Search (DFS) Algorithm - Programiz

    Depth First Search is a recursive algorithm for searching all the vertices of a graph or tree data structure. In this tutorial, you will learn about the depth-first search with examples in Java, C, Python, and C++.

  4. Depth First Search (DFS) – Iterative and Recursive Implementation

    Oct 9, 2023 · Depth–first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root for a graph) and explore as far as possible along each branch before backtracking.

  5. Recursive Graph Algorithms - CodingDrills

    Recursive Graph Algorithms. Recursive algorithms can also be applied to solve problems involving graphs. Graph traversal algorithms, such as depth-first search (DFS) and breadth-first search (BFS), can be implemented using recursion. Let's illustrate this with an example of DFS traversal on a graph:

  6. Graph Algorithms - CSE 373

    A recursive graph traversal algorithm that explores as far as possible from a given start vertex until it reaches a base case and needs to backtrack.

  7. Introduction to Depth First Search Algorithm (DFS) - Baeldung

    Mar 24, 2023 · In graph theory, one of the main traversal algorithms is DFS (Depth First Search). In this tutorial, we’ll introduce this algorithm and focus on implementing it in both the recursive and non-recursive ways.

  8. Recursive Algorithm/ Recursion Algorithm Explained with …

    Feb 15, 2025 · What is a Recursive Algorithm? A recursive algorithm is an algorithm that solves a problem by solving smaller instances of the same problem. It works by calling itself with a modified input, gradually reducing the problem’s size until it reaches a base case, which ends the recursion. Base Case: This is the condition that stops the recursion.

  9. Graph – Depth First Search using Recursion - TutorialHorizon

    What is depth-first traversal- Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking.

  10. Graph Basics and Recursive Algorithms

    Recursive Algorithms: The Magic of Recursion. Now that we’ve got our graphs sorted, let’s dive into the magical world of recursion. If you’ve ever tried to explain a joke to someone and ended up going in circles, you’ve experienced recursion!

  11. Some results have been removed
Refresh