{"id":17464533,"url":"https://github.com/hqarroum/binary-search-tree","last_synced_at":"2026-02-02T01:33:38.263Z","repository":{"id":141119248,"uuid":"457840468","full_name":"HQarroum/binary-search-tree","owner":"HQarroum","description":"🌳 A set of idiomatic implementations of a binary-search tree in multiple languages.","archived":false,"fork":false,"pushed_at":"2024-09-14T23:47:16.000Z","size":11384,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-22T09:42:45.751Z","etag":null,"topics":["algorithms-and-data-structures","binary-search-tree","bst-tree","c","cpp17","data-structures","python","tree-structure"],"latest_commit_sha":null,"homepage":"","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/HQarroum.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":"2022-02-10T15:39:19.000Z","updated_at":"2025-02-28T10:05:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"af547d9c-c44a-4d9d-9456-d663388683b8","html_url":"https://github.com/HQarroum/binary-search-tree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HQarroum/binary-search-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HQarroum%2Fbinary-search-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HQarroum%2Fbinary-search-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HQarroum%2Fbinary-search-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HQarroum%2Fbinary-search-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HQarroum","download_url":"https://codeload.github.com/HQarroum/binary-search-tree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HQarroum%2Fbinary-search-tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28999811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T01:32:03.847Z","status":"ssl_error","status_checked_at":"2026-02-02T01:32:03.458Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["algorithms-and-data-structures","binary-search-tree","bst-tree","c","cpp17","data-structures","python","tree-structure"],"created_at":"2024-10-18T10:46:14.690Z","updated_at":"2026-02-02T01:33:38.241Z","avatar_url":"https://github.com/HQarroum.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr /\u003e\u003cbr /\u003e\u003cbr /\u003e\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"180\" src=\"assets/icon.png\" /\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\u003cbr /\u003e\n\n# binary-search-tree\n\u003e A set of idiomatic implementations of a binary-search tree in multiple languages.\n\nCurrent version: **1.0.0**\n\n## 📋 Table of content\n\n- [Description](#-description)\n- [Implementations](#-implementations)\n- [See also](#-see-also)\n\n## 🔰 Description\n\nThis repository contains idiomatic implementations of a [Binary Search Tree](https://en.wikipedia.org/wiki/Binary_search_tree) in multiple programming languages. The purpose of this repository is purely educational and aims to introduce a binary search tree recursive data structure, as well as its many implementation details across multiple languages.\n\nA binary search tree is a tree data structure that can store arbitrarily typed data by enforcing the following properties :\n\n- The left subtree of a node contains only nodes with keys lesser than the node’s key.\n- The right subtree of a node contains only nodes with keys greater than the node’s key.\n- The left and right subtree each must also be a binary search tree.\n- It doesn't have any duplicate nodes.\n\nA binary search tree supports operations like `search`, `insertion`, `deletion`, `min-max search`, in $O(h)$ time where $h$ is the height of the tree. In a fully balanced binary search tree, the complexity of these operations tends to $O(\\log{}n)$, where $n$ is the number of nodes in the tree. In the worst case scenario of a fully unbalanced tree, the complexity tends to $O(n)$.\n\n\u003e Below is an example of the structural organization of elements in a binary search tree.\n\n\u003cbr /\u003e\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"500\" src=\"assets/bst.png\" /\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\u003cbr /\u003e\n\n## ✏️ Implementations\n\nThis repository contains implementations in the following languages.\n\n\u003e Click to access a particular implementation 👇.\n\n\u003cbr /\u003e\n\u003ctable align=\"center\"\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003ePython\u003c/th\u003e\n      \u003cth\u003eTypescript\u003c/th\u003e\n      \u003cth\u003eC\u003c/th\u003e\n      \u003cth\u003eC++\u003c/th\u003e\n      \u003cth\u003eKotlin\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"src/python\"\u003e\u003cimg width=\"60\" src=\"assets/python.png\" \u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"src/typescript\"\u003e\u003cimg width=\"60\" src=\"assets/typescript.png\" /\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"src/c\"\u003e\u003cimg width=\"60\" src=\"assets/c.png\" \u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"src/c++\"\u003e\u003cimg width=\"60\" src=\"assets/c++.png\" \u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"src/kotlin\"\u003e\u003cimg width=\"60\" src=\"assets/kotlin.png\" \u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\u003cbr /\u003e\n\n## 👀 See also\n\n- The [Binary Search Tree](https://en.wikipedia.org/wiki/Binary_search_tree) Wiki page.\n- [Convert](https://www.geeksforgeeks.org/convert-normal-bst-balanced-bst/) a Binary Search Tree into a balanced tree.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhqarroum%2Fbinary-search-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhqarroum%2Fbinary-search-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhqarroum%2Fbinary-search-tree/lists"}