0x1D. C - Binary trees

This project includes the following tasks

  • New node - Write a function that creates a binary tree node
  • Insert left - Write a function that inserts a node as the left-child of another node
  • Insert right - Write a function that inserts a node as the right-child of another node
  • Delete - Write a function that deletes an entire binary tree
  • Is leaf - Write a function that checks if a node is a leaf
  • Is root - Write a function that checks if a given node is a root
  • Pre-order traversal - Write a function that goes through a binary tree using pre-order traversal
  • In-order traversal - Write a function that goes through a binary tree using in-order traversal
  • Post-order traversal - Write a function that goes through a binary tree using post-order traversal
  • Height - Write a function that measures the height of a binary tree
  • Depth - Write a function that measures the depth of a node in a binary tree
  • Size - Write a function that measures the size of a binary tree
  • Leaves - Write a function that counts the leaves in a binary tree
  • Nodes - Write a function that counts the nodes with at least 1 child in a binary tree
  • Balance factor - Write a function that measures the balance factor of a binary tree
  • Is full - Write a function that checks if a binary tree is full
  • Is perfect - Write a function that checks if a binary tree is perfect
  • Sibling - Write a function that finds the sibling of a node
  • Uncle - Write a function that finds the uncle of a node

Advanced Tasks

  • Lowest common ancestor - Write a function that finds the lowest common ancestor of two nodes
  • Level-order traversal - Write a function that goes through a binary tree using level-order traversal
  • Is complete - Write a function that checks if a binary tree is complete
  • Rotate left - Write a function that performs a left-rotation on a binary tree
  • Rotate right - Write a function that performs a right-rotation on a binary tree
  • Is BST - Write a function that checks if a binary tree is a valid Binary Search Tree
  • BST - Insert - Write a function that inserts a value in a Binary Search Tree
  • BST - Array to BST - Write a function that builds a Binary Search Tree from an array
  • BST - Search - Write a function that searches for a value in a Binary Search Tree
  • BST - Remove - Write a function that removes a node from a Binary Search Tree
  • Big O #BST - What are the average time complexities of those operations on a Binary Search Tree (one answer per line):
  • Is AVL - Write a function that checks if a binary tree is a valid AVL Tree
  • AVL - Insert - Write a function that inserts a value in an AVL Tree
  • AVL - Array to AVL - Write a function that builds an AVL tree from an array
  • AVL - Remove - Write a function that removes a node from an AVL tree
  • AVL - From sorted array - Write a function that builds an AVL tree from an array
  • Big O #AVL Tree - What are the average time complexities of those operations on an AVL Tree (one answer per line):
  • Is Binary heap - Write a function that checks if a binary tree is a valid Max Binary Heap
  • Heap - Insert - Write a function that inserts a value in Max Binary Heap
  • Heap - Array to Binary Heap - Write a function that builds a Max Binary Heap tree from an array
  • Heap - Extract - Write a function that extracts the root node of a Max Binary Heap
  • Heap -Sort - Write a function that converts a Binary Max Heap to a sorted array of integers
  • Big O #Binary Heap - What are the average time complexities of those operations on a Binary Heap (one answer per line):

Author

Faruk Abubakar