{"id":27154970,"url":"https://github.com/maximilianfeldthusen/dfs","last_synced_at":"2025-04-08T18:56:38.249Z","repository":{"id":277960936,"uuid":"934057283","full_name":"maximilianfeldthusen/dfs","owner":"maximilianfeldthusen","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-26T17:09:57.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"TFD","last_synced_at":"2025-03-26T18:25:06.248Z","etag":null,"topics":["cpp","dfs-algorithm","graph"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maximilianfeldthusen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-17T07:48:43.000Z","updated_at":"2025-03-26T17:10:00.000Z","dependencies_parsed_at":"2025-02-17T08:32:56.113Z","dependency_job_id":"2eef4b55-739d-4da6-8871-de8179175a2e","html_url":"https://github.com/maximilianfeldthusen/dfs","commit_stats":null,"previous_names":["maximilianfeldthusen/dfs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianfeldthusen%2Fdfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianfeldthusen%2Fdfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianfeldthusen%2Fdfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianfeldthusen%2Fdfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximilianfeldthusen","download_url":"https://codeload.github.com/maximilianfeldthusen/dfs/tar.gz/refs/heads/TFD","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247909160,"owners_count":21016478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","dfs-algorithm","graph"],"created_at":"2025-04-08T18:56:37.797Z","updated_at":"2025-04-08T18:56:38.233Z","avatar_url":"https://github.com/maximilianfeldthusen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Documentation \n\n### C++ implementation of the Depth-First Search (DFS) algorithm, showcasing both recursive and iterative methods.\n\n- Graph Representation: The graph is represented using an adjacency list, which is a map where each key corresponds to a vertex, and its value is a vector containing the adjacent vertices.\n- Depth-First Search (DFS): DFS is a graph traversal algorithm that explores as far as possible along each branch before backtracking. It can be implemented in both recursive and iterative forms.\n- Visited Tracking: A map is utilized to track visited vertices, preventing cycles and ensuring that each vertex is processed only once.\n\nCode\n\nThe code is organized into a Graph class with the following essential components:\n\n- addEdge: A method to create edges between vertices.\n- dfsRecursive: A method that implements the recursive DFS algorithm.\n- dfsIterative: A method that implements the iterative DFS algorithm using a stack.\n- performDFS: A method that starts the DFS traversal from a specified starting vertex.\n\nExplanation:\n\n- Graph Class: The Graph class encapsulates the graph's functionality, including the adjacency list and methods for adding edges and executing DFS.\n- addEdge Method: This method takes two integers, u and v, and establishes an undirected edge between them by updating the adjacency list.\n- dfsRecursive Method: This method carries out a recursive DFS starting from the initial vertex. It marks the vertex as visited and recursively visits all unvisited neighbors.\n- dfsIterative Method: This method implements DFS iteratively using a stack. It processes vertices by popping from the stack and pushing unvisited neighbors onto it.\n- performDFS Method: This method coordinates the DFS traversal by invoking both the recursive and iterative approaches.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilianfeldthusen%2Fdfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximilianfeldthusen%2Fdfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilianfeldthusen%2Fdfs/lists"}