{"id":20347983,"url":"https://github.com/ganesh-k13/btree","last_synced_at":"2025-09-13T19:04:56.714Z","repository":{"id":50133813,"uuid":"107754096","full_name":"ganesh-k13/Btree","owner":"ganesh-k13","description":"B-tree implementation in C based on algorithm in CLRS.","archived":false,"fork":false,"pushed_at":"2021-06-03T05:59:57.000Z","size":18950,"stargazers_count":13,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"file-implementation","last_synced_at":"2025-04-12T01:03:23.172Z","etag":null,"topics":["b-tree","btree","c","clrs-book","python"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ganesh-k13.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}},"created_at":"2017-10-21T05:31:13.000Z","updated_at":"2025-02-01T02:41:21.000Z","dependencies_parsed_at":"2022-09-03T14:20:58.443Z","dependency_job_id":null,"html_url":"https://github.com/ganesh-k13/Btree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganesh-k13%2FBtree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganesh-k13%2FBtree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganesh-k13%2FBtree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganesh-k13%2FBtree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ganesh-k13","download_url":"https://codeload.github.com/ganesh-k13/Btree/tar.gz/refs/heads/file-implementation","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501865,"owners_count":21114683,"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":["b-tree","btree","c","clrs-book","python"],"created_at":"2024-11-14T22:18:46.849Z","updated_at":"2025-04-12T01:03:37.274Z","avatar_url":"https://github.com/ganesh-k13.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# B Tree\n\n[![Build Status](https://travis-ci.org/ganesh-k13/Btree.svg?branch=file-implementation)](https://travis-ci.org/ganesh-k13/Btree)\n\nB trees implementation written in C based on Introduction to Algorithms, CLRS.\n\n### Prerequisites\n\n* gcc (Ubuntu 5.4.1-8ubuntu1) or higher\n* clang version 4.0.0-1ubuntu1 or higher [optional] [recommended]\n* CUDA Version 9.0.176 or higher [optional]\n* Python 3.5.3 or higher\n* matplotlib==2.0.2 or higher\n\n### Installing\n\nFirst compile the project on your local system by:\n\n```\nmake clean\nmake T=[T_VALUE]\n\nExample:\n\nroot@ubuntu:/var/ws/Btree# ./test -sb 100000 782891\n\nTree built in: 4165.050387 ms\n\nKey: 782891\nCountry: USA\nGrate: PACL\nScore: 45\nRate: 22\n\nResult found in: 0.055295 ms\n\n\n```\nFor testing if it works, see Running tests below\n\n## Running Tests\n\nFor manual tests, run:\n\n``` \n./test [OPTIONS]... [PARAMETERS]...\n\nOPTIONS:\n    \n    -b [LENGTH]\n        Build B tree and flush to file bearing [LENGTH] records from dataset.csv\n    -d [KEY]\n        Delete record bearing the given [KEY].\n    -s [KEY]\n        Print record details bearing the given [KEY] by reading existing file.\n    -sb [LENGTH] [KEY]\n        Build B tree and flush to file bearing [LENGTH] records from dataset.csv and print record details bearing the given [KEY]\n    -t [LENGTH] \n        Testing option.\n    \nEXAMPLE:\n    ./test -sb 100000 75643\n```\n\nFor automated tests, run:\n\n```\npython3 tester.py\n```\n\nThe script does the following: \n\n* The python script compiles the source code for t values = 2^i for i in [2, 10).\n* It builds the tree for the above t values with 1,000,000 records and plots graphs for t-values vs time.\n* It searches for 10 random keys for each t value (same ten keys) and plots t_values vs average of those times.\n\nTo clear existing .dat file:\n\n```\nmake remdat\n```\n\n## Deployment\n\nFor using the B Tree:\n\n* Copy BTree.h and Node.h header files to the location of your source file.\n* Include BTree.h and Node.h to your source file.\n* Use BTree.o and Node.o object files and compile your program:\n\n## Built With\n\n* C - The main backend used\n* Python 3 - For testing\n* Matplotlib - For plotting results\n\n## Authors\n\n* **Ganesh K.** - [LinkedIn](https://www.linkedin.com/in/ganesh-kathiresan/)\n\n## Acknowledgments\n\n* This is developed as an assignment for Advanced Algorithms Course.\n* I would like to thank my professors, Prof. NS Kumar and Prof. Channa Bankapur for their valuable advice. \n* I would like to give credit to Prof. NS Kumar for providing necessary code for file handling.\n* The delete functions are based on GeeksforGeeks implementation in C++.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganesh-k13%2Fbtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fganesh-k13%2Fbtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganesh-k13%2Fbtree/lists"}