×
ALL THE HUSTLE, LATE NIGHTS, MISSED PARTIES, EARLY MORNINGS WILL BE WORTH IT.
--Your friends at LectureNotes
Close

Data Structure and Algorithms

by Shelly CopperShelly Copper
Type: NoteViews: 14Uploaded: 7 months ago

Share it with your friends

Suggested Materials

Leave your Comments

Contributors

Shelly Copper
Shelly Copper
TREE Tree is a non-linear data structure which organizes data in hierarchical structure and this is a recursive definition. In tree data structure, every individual element is called as Node. Node in a tree data structure, stores the actual data of that particular element and link to next element in hierarchical structure. For e.g-
Binary Tree A binary tree is a data structure in which each node has at most two children ,which are referred to as the left child and the right child. for e.g-
Binary Search TreeBinary Search Tree, is a node-based binary tree data structure which has the following properties: • The left subtree of a node contains only nodes with values less than the root’s value. • The right subtree of a node contains only nodes with value greater than the root’s value. • The left and right subtree each must also be a binary search tree. There must be no duplicate nodes.
• For example -

Lecture Notes