{"id":22323694,"url":"https://github.com/mdawoud27/binary_trees","last_synced_at":"2025-03-26T05:23:02.708Z","repository":{"id":204810980,"uuid":"712554028","full_name":"mdawoud27/binary_trees","owner":"mdawoud27","description":"This project is about binary trees and includes various functions to work with binary trees, such as finding the height, depth, and size of a tree, checking if a tree is balanced, and more.","archived":false,"fork":false,"pushed_at":"2023-11-02T21:04:39.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T07:13:01.883Z","etag":null,"topics":["binary-tree","c","data-structures"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdawoud27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-10-31T17:40:50.000Z","updated_at":"2023-11-02T05:56:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"51cd5bda-507a-447f-88b7-195d50c0ee71","html_url":"https://github.com/mdawoud27/binary_trees","commit_stats":null,"previous_names":["mdawoud27/binary_trees"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdawoud27%2Fbinary_trees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdawoud27%2Fbinary_trees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdawoud27%2Fbinary_trees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdawoud27%2Fbinary_trees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdawoud27","download_url":"https://codeload.github.com/mdawoud27/binary_trees/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245593151,"owners_count":20640977,"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-tree","c","data-structures"],"created_at":"2024-12-04T01:11:36.203Z","updated_at":"2025-03-26T05:23:02.686Z","avatar_url":"https://github.com/mdawoud27.png","language":"C","readme":"# Binary Trees\n\nThis project is focused on implementing various operations and functionalities related to binary trees in the C programming language. Binary trees are hierarchical data structures that consist of nodes connected by edges. Each node in a binary tree has at most two children, often referred to as the left child and the right child. This repo includes various functions to work with binary trees, such as finding the height, depth, and size of a tree, checking if a tree is balanced, and more.\n\n## General Topics\n- What is a binary tree.\n- What is the difference between a binary tree and a - Binary Search Tree.\n- What is the possible gain in terms of time complexity compared to linked lists.\n- What are the depth, the height, the size of a binary tree.\n- What are the different traversal methods to go through a binary tree.\n- What is a complete, a full, a perfect, a balanced binary tree.\n\n## Resources\n**Read or watch:**\n\n- [Data Structure and Algorithms - Tree](https://www.tutorialspoint.com/data_structures_algorithms/tree_data_structure.htm)\n- [Tree Traversal](https://www.programiz.com/dsa/tree-traversal)\n- [Data structures: Binary Tree](https://www.youtube.com/watch?v=H5JubkIy_p8)\n\n## More info for implementation this project\n### Data structures\nPlease use the following data structures and types for binary trees. Don’t forget to include them in your header file.\n\n**Basic Binary Tree**\n```c\n/**\n * struct binary_tree_s - Binary tree node\n *\n * @n: Integer stored in the node\n * @parent: Pointer to the parent node\n * @left: Pointer to the left child node\n * @right: Pointer to the right child node\n */\nstruct binary_tree_s\n{\n    int n;\n    struct binary_tree_s *parent;\n    struct binary_tree_s *left;\n    struct binary_tree_s *right;\n};\n\ntypedef struct binary_tree_s binary_tree_t;\n\n/*Binary Search Tree*/\ntypedef struct binary_tree_s bst_t;\n\n/*AVL Tree*/\ntypedef struct binary_tree_s avl_t;\n\n/*Max Binary Heap*/\ntypedef struct binary_tree_s heap_t;\n```\n\n### Print function\nTo match the examples in the tasks, you are given [this function](https://github.com/alx-tools/0x1C.c) is used only for visualization purposes.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdawoud27%2Fbinary_trees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdawoud27%2Fbinary_trees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdawoud27%2Fbinary_trees/lists"}