Binary Tree:-
Binary Tree Implementation in Java

Binary Tree:-

Binary:-

A binary tree is a recursive data structure where each node can have two children at most.

A common type of binary tree is a binary search tree, in which every node has a value that is greater than or equal to the node values in the left sub-tree, and than or equal to the node values in the right sub-tree.

Operations on Binary Tree:

  • Inserting Elements
  • Finding an Element
  • Deleting an Element

Traversing the Tree

  • Inorder Traverse:-
  • preorder Traverse:-
  • postorder Traverse:-

1
2
3


要查看或添加评论,请登录

Nilu Kumari的更多文章

  • Data Structure #01

    Data Structure #01

    Given an integer array nums, return true if any value appears at least twice in the array, and return false if every…

  • Comparable & Comparator in Java

    Comparable & Comparator in Java

    Comparable & Comparator both are interfaces and can be used to sort collection elements. Comparable provides a single…

  • Queue Implementation Using LinkedList

    Queue Implementation Using LinkedList

    Queue:- A queue is defined as a linear data structure that is open at both ends and the operations are performed in…

  • Wrapper Classes

    Wrapper Classes

    Wrapper classes provides the mechanism to convert primitive into object and object into primitive. There are two way to…

  • Doubly Linked List

    Doubly Linked List

    Doubly Linked List:- A doubly linked list is a special type of linked list in which each node contains a pointer to the…

  • LinkedList Implementation In detail.

    LinkedList Implementation In detail.

    LinkedList--> LinkedList is a part of the Collection Framework present in java.util package.

  • Composition in Java

    Composition in Java

    Composition:-composition represents a stronger relationship where one class is composed of one or more other classes…

  • Aggregation in Java

    Aggregation in Java

    Association:- Association is to show the relationship between two or more class. It shows Has-a-relationship.

  • JDBC

    JDBC

    /* * JDBC: Java Database Connectivity * In real word we are seeing that some login page or register page * when a user…

  • Stack Implementation Using LinkedList

    Stack Implementation Using LinkedList

    public class Stack { static class Node{ int data; Node next; Node(int data){ this.data=data; this.

社区洞察

其他会员也浏览了