Tree data structure tutorial 11. Introduction to Segment Trees

In this chapter we shall learn about below topics: 11.1 Introduction to Segment Trees 11.2 Need of Segment Tree? 11.3 Finding Sum of given range in an array 11.4 Finding Min value given range in an array 11.1 Introduction to Segment Trees Segment tree is a special tree that is based on ranges. In this […]

Tree data structure tutorial 10. AVL tree introduction and its implementation

In this chapter we shall learn about below topics: 10.1 AVL Tree Introduction 10.2 Need of AVL Tree? 10.3 LL Rotation 10.4 RR Rotation 10.5 LR Rotation 10.6 RL Rotation  10.7 Implementation 10.1 Introduction to AVL Tree: A tree can be called as AVL tree, if it satisfies below 2 properties: 1. It should be […]

Tree data structure tutorial 9. Priority Queue

In this chapter we shall have a look at: 9.1. Priority Queue introduction 9.2. Usage of Priority Queue 9.3. Operations that can be performed on Priority Queue 9.4. Implementation of Priority Queue 9.5 Output In this chapter we shall learn about priority queue and it’s implementation using Linked list in C language. 9.1. Priority Queue […]

Tree data structure tutorial 8. Heaps

In this chapter we shall have a look at: 8.1. Heaps introduction 8.2. Different types of heaps 8.3. Operations that can be performed on heaps 8.4. C++ program to implement heaps 8.1 Heaps introduction: Heap is a tree based data structure that satisfies a property. This property varies on the type of heap used. What […]

Tree data structure tutorial 7. TRIE Data structure

In this chapter we shall look at following things: 7.1. Introduction to TRIE 7.2. Insertion  7.3. Search 7.4. Auto complete 7.1. Introduction to TRIE TRIE stands for reTrival. It is based on tree data structure, where a single node will store a single alphabet, and we can search for strings or words by traversing down […]

Tree data structure tutorial 6. Implementation of Binary tree in C++

Implement below operations on Binary Tree 1. Insert Operation 2. Find Min 3. Find Max 4. In-order Traversal 5. Pre-order Traversal 6. Post-order Traversal 7. Get height of the tree 8. Check if the tree is a balanced tree 9. Delete entire tree 10. Find given key Implementation of Binary Tree in C++ #include<iostream> #include<vector> […]

Tree data structure tutorial 5. Implementation of BST in C++

Implement below operations on Binary Search Tree 1. Insert Operation 2. Find Min 3. Find Max 4. In-order Traversal 5. Pre-order Traversal 6. Post-order Traversal 7. Get height of the tree 8. Check if the tree is a balanced tree 9. Delete node with given key 10. Find given key BST Implementation in C++ #include<iostream> […]

Tree data structure tutorial 4. Binary Search Tree Introduction

Tree data structure tutorial 4. Binary Search Tree Introduction In this tutorial we shall learn about following topics: 4.1 Binary Search Tree Introduction 4.2 Example of a Binary Search Tree. 4.3 How to search for an element in BST 4.4 How to insert an element in BST 4.1 Binary Search Tree Introduction Binary Search Tree […]