Giter VIP home page Giter VIP logo

holbertonschool-binary_trees's Introduction

Binary Trees Project

Overview

This project focuses on the implementation and manipulation of binary trees in the C programming language. It includes the creation of basic binary trees, binary search trees, AVL trees, and max binary heaps. The project also covers various operations and characteristics associated with binary trees.

Table of Contents

  1. Introduction
  2. Binary Trees
  3. Binary Search Trees
  4. AVL Trees
  5. Max Binary Heap
  6. Requirements
  7. Usage
  8. Coding Style
  9. Testing
  10. Contributing
  11. Authors

Introduction

A binary tree is a hierarchical data structure consisting of nodes, where each node has at most two children: left and right. The structure of a binary tree provides efficient storage and retrieval of data.

Binary Trees

In this project, we deal with simple binary trees. They are not Binary Search Trees (BSTs) and do not follow any specific rule.

Binary Search Trees

A Binary Search Tree is a binary tree with the property that the left subtree of a node contains only nodes with values less than the node's value, and the right subtree only nodes with values greater than the node's value.

AVL Trees

An AVL Tree (named after its inventors Adelson-Velsky and Landis) is a self-balancing binary search tree. It maintains its balance by performing rotations when necessary after insertions and deletions.

Max Binary Heap

A Max Binary Heap is a binary tree that satisfies the heap property - the value of each node is less than or equal to the values of its children.

Requirements

  • The code is written in C and compiled using gcc on Ubuntu 20.04 LTS.
  • Coding style follows the Betty style guide.
  • No global variables are used.
  • Each file contains no more than 5 functions.
  • Prototypes are included in the header file (binary_trees.h).
  • Header files are include guarded.

Usage

To use the functions implemented in this project, include the binary_trees.h header file in your C program.

#include "binary_trees.h"

Coding Style

The code follows the Betty style guide. Use the provided betty-style.pl and betty-doc.pl scripts to check for compliance.

Testing

A main.c file is provided as an example to test the functions. You may use your own test cases or modify the existing ones for testing.

Contributing

Contributions to the project are welcome. If you find any issues or have improvements, feel free to create a pull request.

Authors

Gulnar Rahimli & Saleh Shahverdiyev.

holbertonschool-binary_trees's People

Contributors

gulrah avatar salehshahverdiyev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.