GithubHelp home page GithubHelp logo

abdulazeez41 / binary_trees Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 16 KB

A hierarchical data structure in which each node has at most two children, referred to as the left child and the right child. The topmost node is called the root, and nodes with no children are called leaves

C 100.00%

binary_trees's Introduction

Binary Tree

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. The topmost node in a binary tree is called the root, and nodes with no children are called leaves.

The structure of a binary tree is such that each node has a value or data, and it may have zero, one, or two child nodes. The left subtree of a node contains only nodes with values less than the node's value, and the right subtree contains only nodes with values greater than the node's value. This ordering property makes binary trees useful for efficient searching and sorting operations.

Here are some key terms associated with binary trees:

  1. Root: The topmost node in the tree.
  2. Parent: A node in the tree that has one or more child nodes.
  3. Child: A node in the tree that has a parent node.
  4. Leaf: A node in the tree that has no children.
  5. Subtree: A tree formed by a node and all its descendants.
  6. Height: The length of the longest path from a node to a leaf. The height of the tree is the height of the root.
  7. Depth: The length of the path from the root to a particular node.

binary_trees's People

Contributors

abdulazeez41 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.