Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Non Linear Data Structure
Rating: 4.9 out of 5(3 ratings)
377 students

Non Linear Data Structure

BST,AVL
Created byDrUsha G
Last updated 3/2025
English
English [Auto],

What you'll learn

  • Understand the structure, properties, and purpose of a Binary Search Tree.
  • Implement insertion, deletion, and search operations in a BST
  • Demonstrate inorder, preorder, and postorder traversals and their applications.
  • Explain how AVL trees maintain balance and why they are an improvement over BSTs.
  • Implement rotations (LL, RR, LR, RL) to maintain AVL tree balance.

Course content

2 sections9 lectures1h 16m total length
  • Introduction to Trees21:12

    Explore non-linear data structures by examining trees and binary trees, their root and leaves, levels, height and depth, and concepts like full, complete, strict, and internal/external nodes.

  • Implementation of Trees6:07

    Explore implementing trees with arrays in complete binary trees using index formulas two i plus one, two i plus two, and parent floor((i-1)/2), and contrast with pointer-based representations and traversals.

  • Traversal Algorithm In Detail13:44

    Explore tree traversal algorithms in detail, including in-order, preorder, postorder, and level order traversals. Learn the visiting order and printing sequence for binary trees with practical examples.

  • Construction of Binary Trees2:53

    Construct binary trees from inorder and preorder sequences, and from inorder and postorder or level order sequences, using root identification and subtree placement shown in the example.

  • Expression Trees9:15

    Learn to construct expression trees from arithmetic expressions using binary trees, with leaves as constants or variables and internal operators. Practice infix to postfix conversion.

  • Binary Search Trees4:13

    Explore binary search trees, a non-linear data structure for insertion, searching, and deletion, with root, left and right subtrees, and BST properties.

  • Operations in Binary Search Trees4:04

    Insert elements into a binary search tree while preserving its properties. Delete nodes by leaf removal, single-child replacement, and replacement with its successor for two-child nodes.

Requirements

  • No need for any previous knowledge

Description

A Binary Search Tree (BST) is a tree data structure in which each node has a maximum of two children: a left child with values less than the parent node and a right child with values more than the parent node. This structure facilitates fast searching, insertion, and deletion operations, normally carried out in O(log n) time in an evenly balanced tree. Nonetheless, in the worst scenario, an unbalanced BST can descend to O(n) time complexity. Insertion, deletion, search, and tree traversals like inorder, preorder, and postorder traversals are some of the most common BST operations that play a critical role in data retrieval and processing. BSTs have a vast array of applications, including database indexing, auto-completion systems, and file organization. An AVL Tree is a self-balancing binary search tree where balance factor (difference in height between left and right subtrees of any node) is at most 1. If the balance is broken with insertion or deletion, rotations (LL, RR, LR, RL) are used to correct the balance. AVL trees ensure a strict O(log n) time complexity for search, insertion, and deletion, which is much better than unbalanced BSTs in worst-case situations. AVL trees are used extensively in applications where search efficiency is of utmost importance, including database systems, memory management, and network routing.Though BSTs are easier to implement and require fewer rotations, if unbalanced, they can be inefficient. However, AVL trees maintain balance but have a higher rotation overhead. Knowing both structures assists in choosing the most appropriate tree for various computational requirements. Through the mastery of these concepts, students can maximize data storage and retrieval in actual applications


Who this course is for:

  • Beginners of Data structures