/binary_trees

0x1D. C - Binary Trees

Primary LanguageC

Binary trees

Description

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
  1. New node

    Write a function that creates a binary tree node

  2. Insert left

    Write a function that inserts a node as the left-child of another node

  3. Insert right

    Write a function that inserts a node as the right-child of another node

  4. Delete

    Write a function that deletes an entire binary tree

  5. Is leaf

    Write a function that checks if a node is a leaf

  6. Is root

    Write a function that checks if a given node is a root

  7. Pre-order traversal

    Write a function that goes through a binary tree using pre-order traversal

  8. In-order traversal

    Write a function that goes through a binary tree using in-order traversal

  9. Post-order traversal

    Write a function that goes through a binary tree using post-order traversal

  10. Height

    Write a function that measures the height of a binary tree

  11. Depth

    Write a function that measures the depth of a node in a binary tree

  12. Size

    Write a function that measures the size of a binary tree

  13. Leaves

    Write a function that counts the leaves in a binary tree

  14. Nodes

    Write a function that counts the nodes with at least 1 child in a binary tree

  15. Balance factor

    Write a function that measures the balance factor of a binary tree

  16. Is full

    Write a function that checks if a binary tree is full

  17. Is perfect

    Write a function that checks if a binary tree is perfect

  18. Sibling

    Write a function that finds the sibling of a node

  19. Uncle

    Write a function that finds the uncle of a node

  20. Lowest common ancestor

    Write a function that finds the lowest common ancestor of two nodes

  21. Level-order traversal

    Write a function that goes through a binary tree using level-order traversal

  22. Is complete

    Write a function that checks if a binary tree is complete

  23. Rotate left

    Write a function that performs a left-rotation on a binary tree

  24. Rotate right

    Write a function that performs a right-rotation on a binary tree

  25. Is BST

    Write a function that checks if a binary tree is a valid Binary Search Tree

  26. BST - Insert

    Write a function that inserts a value in a Binary Search Tree

  27. BST - Array to BST

    Write a function that builds a Binary Search Tree from an array

  28. BST - Search

    Write a function that searches for a value in a Binary Search Tree

  29. BST - Remove

    Write a function that removes a node from a Binary Search Tree

  30. Big O #BST

    What are the average time complexities of those operations on a Binary Search Tree (one answer per line):

  31. Is AVL

    Write a function that checks if a binary tree is a valid AVL Tree

  32. AVL - Insert

    Write a function that inserts a value in an AVL Tree

  33. AVL - Array to AVL

    Write a function that builds an AVL tree from an array

  34. AVL - Remove

    Write a function that removes a node from an AVL tree

  35. AVL - From sorted array

    Write a function that builds an AVL tree from an array

  36. Big O #AVL Tree

    What are the average time complexities of those operations on an AVL Tree (one answer per line):

  37. Is Binary heap

    Write a function that checks if a binary tree is a valid Max Binary Heap

  38. Heap - Insert

    Write a function that inserts a value in Max Binary Heap

  39. Heap - Array to Binary Heap

    Write a function that builds a Max Binary Heap tree from an array

  40. Heap - Extract

    Write a function that extracts the root node of a Max Binary Heap

  41. Heap - Sort

    Write a function that converts a Binary Max Heap to a sorted array of integers

  42. Big O #Binary Heap

    What are the average time complexities of those operations on a Binary Heap (one answer per line):

Author Evans Kipkemoi