Binary Tree Data Structure

  • Last Updated : 06 Feb, 2023

Learn more about Binary Tree in DSA Self Paced Course
Practice Problems on Binary Tree !
Recent Articles on Binary Tree !

What is Binary Tree Data Structure?

Binary Tree is defined as a tree data structure where each node has at most 2 children. Since each element in a binary tree can have only 2 children, we typically name them the left and right child.

Binary Tree Data Structure

Binary Tree Representation

A Binary tree is represented by a pointer to the topmost node (commonly known as the “root”) of the tree. If the tree is empty, then the value of the root is NULL. Each node of a Binary Tree contains the following parts:

  1. Data
  2. Pointer to left child
  3. Pointer to right child

Basic Operation On Binary Tree:

  • Inserting an element.
  • Removing an element.
  • Searching for an element.
  • Traversing the tree.

Auxiliary Operation On Binary Tree:

  • Finding the height of the tree
  • Find the level of a node of the tree
  • Finding the size of the entire tree.

Topic :

Introduction :

Basic Operations on Binary Tree:


Some other important Binary Tree Traversals :

Must solve Standard Problems on Binary Tree Data Structure:

Quick Links :

GeeksforGeeks Courses:

1. Language Foundation Courses [C++ / JAVA / Python ]
Learn any programming language from scratch and understand all its fundamentals concepts for a strong programming foundation in the easiest possible manner with help of GeeksforGeeks Language Foundation Courses – Java Foundation | Python Foundation | C++ Foundation

2. Complete Interview Preparation
Get fulfilled all your interview preparation needs at a single place with the Complete Interview Preparation Course that provides you all the required stuff to prepare for any product-based, service-based, or start-up company at the most affordable prices.

3. DSA Self Paced
Start learning Data Structures and Algorithms to prepare for the interviews of top IT giants like Microsoft, Amazon, Adobe, etc. with DSA Self-Paced Course where you will get to learn and master DSA from basic to advanced level and that too at your own pace and convenience.

4. Company Specific Courses – Amazon & Microsoft
Crack the interview of any product-based giant company by specifically preparing with the questions that these companies usually ask in their coding interview round.
Refer GeeksforGeeks Company Specific Courses: Amazon SDE Test Series, etc.


If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks. Please write
comments if you find anything incorrect, or you want to share more information about the topic discussed above.

My Personal Notes arrow_drop_up