kaelwebdev / binary_trees

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0x1D. C - Binary trees

Resources:books:

Read or watch:


Learning Objectives:bulb:

What you should learn from this project:

  • What is a binary tree
  • What is the difference between a binary tree and a Binary Search Tree
  • What is the possible gain in terms of time complexity compared to linked lists
  • What are the depth, the height, the size of a binary tree
  • What are the different traversal methods to go through a binary tree
  • What is a complete, a full, a perfect, a balanced binary tree

  • Write a function that creates a binary tree node
  • Write a function that inserts a node as the left-child of another node
  • Write a function that inserts a node as the right-child of another node
  • Write a function that deletes an entire binary tree
  • Write a function that checks if a node is a leaf
  • Write a function that checks if a given node is a root
  • Write a function that goes through a binary tree using pre-order traversal
  • Write a function that goes through a binary tree using in-order traversal
  • Write a function that goes through a binary tree using post-order traversal
  • Write a function that measures the height of a binary tree
  • Write a function that measures the depth of a node in a binary tree
  • Write a function that measures the size of a binary tree
  • Write a function that counts the leaves in a binary tree
  • Write a function that counts the nodes with at least 1 child in a binary tree
  • Write a function that measures the balance factor of a binary tree
  • Write a function that checks if a binary tree is full
  • Write a function that checks if a binary tree is perfect
  • Write a function that finds the sibling of a node
  • Write a function that finds the uncle of a node
  • Write a function that finds the lowest common ancestor of two nodes
  • Write a function that goes through a binary tree using level-order traversal
  • Write a function that checks if a binary tree is complete
  • Write a function that performs a left-rotation on a binary tree
  • Write a function that performs a right-rotation on a binary tree
  • Write a function that checks if a binary tree is a valid Binary Search Tree
  • Write a function that inserts a value in a Binary Search Tree
  • Write a function that builds a Binary Search Tree from an array
  • Write a function that searches for a value in a Binary Search Tree
  • Write a function that removes a node from a Binary Search Tree
  • What are the average time complexities of those operations on a Binary Search Tree (one answer per line):
  • Write a function that checks if a binary tree is a valid AVL Tree
  • Write a function that inserts a value in an AVL Tree
  • Write a function that builds an AVL tree from an array
  • Write a function that removes a node from an AVL tree
  • Write a function that builds an AVL tree from an array
  • What are the average time complexities of those operations on an AVL Tree (one answer per line):
  • Write a function that checks if a binary tree is a valid Max Binary Heap
  • Write a function that inserts a value in Max Binary Heap
  • Write a function that builds a Max Binary Heap tree from an array
  • Write a function that extracts the root node of a Max Binary Heap
  • Write a function that converts a Binary Max Heap to a sorted array of integers
  • What are the average time complexities of those operations on a Binary Heap (one answer per line):

Author

About


Languages

Language:C 100.0%