{"id":19636014,"url":"https://github.com/xiaoxiae/dfs-constant-memory","last_synced_at":"2025-10-12T14:17:59.243Z","repository":{"id":127937220,"uuid":"311501249","full_name":"xiaoxiae/dfs-constant-memory","owner":"xiaoxiae","description":"Various DFS implementations, written in C++.","archived":false,"fork":false,"pushed_at":"2020-11-25T08:36:49.000Z","size":34,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-24T16:53:42.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiaoxiae.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":"2020-11-10T00:34:08.000Z","updated_at":"2021-04-30T15:36:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"425aa3d9-33d3-4ec3-9394-6da40ba2c0f8","html_url":"https://github.com/xiaoxiae/dfs-constant-memory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xiaoxiae/dfs-constant-memory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiae%2Fdfs-constant-memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiae%2Fdfs-constant-memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiae%2Fdfs-constant-memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiae%2Fdfs-constant-memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaoxiae","download_url":"https://codeload.github.com/xiaoxiae/dfs-constant-memory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoxiae%2Fdfs-constant-memory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011597,"owners_count":26084963,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-11T12:28:00.214Z","updated_at":"2025-10-12T14:17:59.227Z","avatar_url":"https://github.com/xiaoxiae.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DFS in constant memory [WIP, not finished]\nA C++ implementation of the [Linear-Time In-Place DFS and BFS on the Word RAM](https://arxiv.org/abs/1803.04282v4) article, which allows to run a DFS on a graph (given a specific representation) in constant additional memory and linear time, as opposed to a standard DFS algorithms that use O(n) additional memory.\n\n## Sample usage\n```c++\n#include \"lib/dfs-constant-memory.h\"\n#include \u003cvector\u003e\n#include \u003ciostream\u003e\n\nvoid entering(int v)  { std::cout \u003c\u003c \"Entering vector \" + std::to_string(v) + \".\" \u003c\u003c std::endl;  }\nvoid exiting(int v)  { std::cout \u003c\u003c \"Exiting vector \" + std::to_string(v) + \".\" \u003c\u003c std::endl;  }\n\nint main() {\n    std::vector\u003cint\u003e graph{5, 7, 9, 12, 14, 17, 12, 2, 5, 1, 3, 4, 2, 4, 2, 3, 5, 1, 4};\n    int starting_vertex = 3;\n\n    dfs_constant_memory(graph, starting_vertex, entering, exiting);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoxiae%2Fdfs-constant-memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaoxiae%2Fdfs-constant-memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoxiae%2Fdfs-constant-memory/lists"}