Code Monkey home page Code Monkey logo

binary_trees's Introduction

C Programming

0x1D. C - Binary trees


0x1D. Binary trees


A binary tree is a tree data structure in which each node has at most two children,
which are referred to as the left child and the right child.
A binary tree in C is a data structure in which every node can have a maximum of two children nodes.

Binary trees are often used to represent hierarchical data, such as the file system of a computer.
In a file system, each file or directory can be represented as a node in a binary tree,
with the parent directory being the parent node and the child directories being the child nodes.

Binary trees are also used in many other applications, such as:
* Sorting algorithms
* Searching algorithms
* Compression algorithms

In a binary tree:
1. Each node has at most two children, referred to as the left child and the right child.
2. The topmost node in the tree is called the root.
3. Nodes without any children are called leaf nodes or terminal nodes.
4. Nodes with at least one child are called internal nodes.
5. Nodes at the same level of depth in the tree are often referred to as siblings.
6. The path from the root to any node is called a branch or a path.
7. The depth of a node is the length of the path from the root to that node.

Binary trees are a fundamental data structure in computer science and serve as the basis for
more complex tree structures like balanced binary trees, AVL trees, and red-black trees,
which optimize various operations for specific use cases.

binary_trees's People

Contributors

domodan avatar

Watchers

 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.