{"id":22140778,"url":"https://github.com/xorz57/binarysearchtree","last_synced_at":"2025-03-24T11:18:33.438Z","repository":{"id":205477822,"uuid":"673361786","full_name":"xorz57/BinarySearchTree","owner":"xorz57","description":"Binary Search Tree written in C++14","archived":false,"fork":false,"pushed_at":"2024-07-09T17:59:23.000Z","size":199,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T16:27:37.680Z","etag":null,"topics":["binary-search-tree","cpp","data-structures","datastructures"],"latest_commit_sha":null,"homepage":"https://xorz57.github.io/BinarySearchTree","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/xorz57.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"xorz57","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2023-08-01T13:06:12.000Z","updated_at":"2024-07-09T17:58:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"964d87b0-2f0d-4d4b-839c-e538c0e2b6a9","html_url":"https://github.com/xorz57/BinarySearchTree","commit_stats":null,"previous_names":["xorz57/binarysearchtree"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorz57%2FBinarySearchTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorz57%2FBinarySearchTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorz57%2FBinarySearchTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorz57%2FBinarySearchTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xorz57","download_url":"https://codeload.github.com/xorz57/BinarySearchTree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245258214,"owners_count":20585977,"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":["binary-search-tree","cpp","data-structures","datastructures"],"created_at":"2024-12-01T21:07:31.977Z","updated_at":"2025-03-24T11:18:33.409Z","avatar_url":"https://github.com/xorz57.png","language":"C++","readme":"# BinarySearchTree\n\n[![Build](https://github.com/xorz57/BinarySearchTree/actions/workflows/Build.yml/badge.svg)](https://github.com/xorz57/BinarySearchTree/actions/workflows/Build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xorz57_BinarySearchTree\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=xorz57_BinarySearchTree)\n\n## Example\n\n```cpp\n#include \"BinarySearchTree/BinarySearchTree.hpp\"\n\n#include \u003ciostream\u003e\n#include \u003cstring\u003e\n\nint main() {\n    binary_search_tree_t\u003cint, std::string\u003e tree;\n\n    tree.insert(2, \"two\");\n    tree.insert(4, \"four\");\n    tree.insert(90, \"ninety\");\n    tree.insert(3, \"three\");\n    tree.insert(0, \"zero\");\n    tree.insert(14, \"fourteen\");\n    tree.insert(45, \"forty-five\");\n\n    tree.pre_order_traversal([](auto key, auto \u0026value) {\n        std::cout \u003c\u003c key \u003c\u003c \" -\u003e \" \u003c\u003c value \u003c\u003c std::endl;\n    });\n    std::cout \u003c\u003c std::endl;\n\n    tree.in_order_traversal([](auto key, auto \u0026value) {\n        std::cout \u003c\u003c key \u003c\u003c \" -\u003e \" \u003c\u003c value \u003c\u003c std::endl;\n    });\n    std::cout \u003c\u003c std::endl;\n\n    tree.post_order_traversal([](auto key, auto \u0026value) {\n        std::cout \u003c\u003c key \u003c\u003c \" -\u003e \" \u003c\u003c value \u003c\u003c std::endl;\n    });\n    std::cout \u003c\u003c std::endl;\n\n    return 0;\n}\n```\n\n## How to Build\n\n#### Linux \u0026 macOS\n\n```bash\ngit clone https://github.com/microsoft/vcpkg.git ~/vcpkg\n~/vcpkg/bootstrap-vcpkg.sh\n\ngit clone https://github.com/xorz57/BinarySearchTree.git\ncd BinarySearchTree\ncmake -B build -DCMAKE_BUILD_TYPE=Release -S . -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake\ncmake --build build --config Release\nctest --build-config Release\n```\n\n#### Windows\n\n```powershell\ngit clone https://github.com/microsoft/vcpkg.git C:/vcpkg\nC:/vcpkg/bootstrap-vcpkg.bat\nC:/vcpkg/vcpkg.exe integrate install\n\ngit clone https://github.com/xorz57/BinarySearchTree.git\ncd BinarySearchTree\ncmake -B build -DCMAKE_BUILD_TYPE=Release -S . -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake\ncmake --build build --config Release\nctest --build-config Release\n```\n","funding_links":["https://github.com/sponsors/xorz57"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxorz57%2Fbinarysearchtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxorz57%2Fbinarysearchtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxorz57%2Fbinarysearchtree/lists"}