{"id":22882978,"url":"https://github.com/thanhit95/sutree","last_synced_at":"2025-05-07T05:25:05.766Z","repository":{"id":57472530,"uuid":"360470515","full_name":"thanhit95/sutree","owner":"thanhit95","description":"Tree data structure library with great display utility in Python 3.","archived":false,"fork":false,"pushed_at":"2021-04-28T06:35:10.000Z","size":101,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T06:51:08.923Z","etag":null,"topics":["avl","avl-tree","binary-search-tree","binary-tree","binary-tree-visualization","bst","python","tree-visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","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/thanhit95.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-22T09:53:04.000Z","updated_at":"2023-08-21T12:34:22.000Z","dependencies_parsed_at":"2022-08-31T07:12:07.824Z","dependency_job_id":null,"html_url":"https://github.com/thanhit95/sutree","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/thanhit95%2Fsutree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhit95%2Fsutree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhit95%2Fsutree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhit95%2Fsutree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thanhit95","download_url":"https://codeload.github.com/thanhit95/sutree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252819678,"owners_count":21809063,"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":["avl","avl-tree","binary-search-tree","binary-tree","binary-tree-visualization","bst","python","tree-visualization"],"created_at":"2024-12-13T18:31:09.409Z","updated_at":"2025-05-07T05:25:05.746Z","avatar_url":"https://github.com/thanhit95.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SUTREE\n\n## DESCRIPTION\n\nTree data structure library with great display utility.\n\n\u0026nbsp;\n\n## AUTHOR\n\nThanh Trung Nguyen\n\n- Email: thanh.it1995@gmail.com\n- Facebook: \u003chttps://www.facebook.com/thanh.it95\u003e\n\n\u0026nbsp;\n\n## INSTALLATION\n\n```shell\npip install sutree\n```\n\n\u0026nbsp;\n\n## FEATURES\n\nThis package includes two libraries:\n\n- Tree library.\n- Tree display library.\n\nTODO feature: Implement B-Tree.\n\n**Tree library:**\n\n- Two types of trees: Binary Search Tree, AVL Tree.\n- Regular operations:\n  - Checking empty.\n  - Getting number of nodes.\n  - Getting height.\n  - Traversal:\n    - 3 options: pre-order, in-order, post-order.\n    - 2 modes: recursive traversal and non-recursive traversal.\n  - Checking existence of a key.\n  - Getting minimum key.\n  - Getting maximum key.\n  - Insertion.\n  - Removal.\n  - Constructing from a list.\n\n**Tree display library:**\n\n- It can config space between 2 branch neighbors.\n- It can config precision of floating-point numbers.\n- It accepts any type of key of node. Just makes sure key is convertible to string.\n- It accepts any structure of node, which is high flexibily.\n- It can config left margin.\n- It outputs to:\n  - a string, or...\n  - a list of rows.\n\nOutput example generated by this utility:\n\nOutput example 1:\n\n```text\n                       100\n                        |\n             -----------------------\n             50                  70000\n             |                     |\n       -------------        ----------------\n       10        88.52    20000          90000\n       |           |        |\n   ---------    ----     --------\n-123456  14.78  62      500  30000.19\n                                |\n                                -----\n                                  40000\n```\n\nOutput example 2:\n\n```text\n               func_definition\n                      |\n -------------------------------------------\n |          |          |         |         |\ndef     func_name      (      arg_list     )\n            |                    |\n      sum_2_integers        -----------\n                            |    |    |\n                           arg   ,   arg\n                            |         |\n                           foo       bar\n```\n\n\u0026nbsp;\n\n## TUTORIALS\n\nThere are two sections of tutorials:\n\n- Tree: Using pre-defined trees in library such as BinaryTree, AvlTree...\n  - Take a look at ```/test/tree_```.\n- Display: Display a tree.\n  - Read [tutorials_display.md](tutorials_display.md)\n\n\u0026nbsp;\n\n## CODE STRUCTURE\n\nUpdate later.\n\n\u0026nbsp;\n\n## PROJECT SPECIFICATIONS\n\n- Language: Python 3.8\n- Paradigms: object-oriented, procedural\n\n\u0026nbsp;\n\n## LICENSE\n\nCopyright (c) Thanh Trung Nguyen.\n\nThis project is licensed under the [3-Clause BSD License](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanhit95%2Fsutree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthanhit95%2Fsutree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanhit95%2Fsutree/lists"}