
Learn live coding of binary search trees in C, covering insertion, in-order traversal, and deletion, with real-world context on AVL and red black trees.
Insert nodes into a binary search tree in C by comparing values and placing them left or right, and learn the bst node structure with left and right pointers.
Perform in-order traversal (left, vertex, right) of a binary search tree to produce a sorted sequence, visiting left children before printing the vertex and then the right side.
Learn to implement a binary search tree in C from scratch, including node creation, insertion, and in-order traversal to display a sorted sequence of values.
Master deletion in a binary search tree by handling leaf, one-child, and two-child cases, copying the in-order successor's contents.
Learn binary search tree deletion in C by implementing helper functions like findNode, in order successor, countChildren, and findParent, then build the delete operation with swap logic.
Delete nodes in a binary search tree in C, handling leaf nodes, nodes with one child, and two children, by locating the target, counting children, and updating parent pointers.
Locate the in-order successor of the node to delete and adjust the successor's parent by splicing the right child. Copy the successor's data into the node and free the successor.
In this course we will do live coding of Binary Search Tree in C language. While coding, I am also sharing the thought process which goes on while implementing the logic. We will face compile-time, run-time errors and then we will resolve them.
Binary Search Tree is one of the fundamental data structures used in software development. Many variants of BST like AVL tree, Red-Black tree are used in real world applications. For e.g. "map" container in C++ STL library uses Red-Black tree, Linux Kernel uses Red-Black tree for process scheduling.
In this course we will do hands-on coding of various operations which can be done on BST like:
Writing node structure for BST containing (integer data, pointers to left and right child)
inserting and element into Binary Search Tree - I will explain the property of the Binary Search Tree. With the help of an example (sequence of elements) we will construct the BST.
Displaying the elements of the Binary Search Tree (inorder traversal - theory explanation and then hands on coding)
Deleting elements from the Binary Search Tree 3 cases:
Leaf node
Node with 1 child
Node with 2 children
Passing data by reference and accepting arguments through pointer variables
Different C concepts used while coding:
malloc(), sizeof(), free(), typedef, structures, linked lists, gcc compiler, VS Code editor.