Skip to content

gama1221/binary_trees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

binary_trees

0x1D C - Binary trees

C is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, and so on. This projects covers the concepts of binary trees!

At the end of this project, We were able to undesrtand these questions:

  • 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

Tasks ✔️

  1. Function that creates a binary tree node
  2. Function that inserts a node as the left-child of another node
  3. Function that inserts a node as the right-child of another node
  4. Function that deletes an entire binary tree
  5. Function that checks if a node is a leaf
  6. Function that checks if a given node is a root
  7. Function that goes through a binary tree using pre-order traversal
  8. Function that goes through a binary tree using in-order traversal
  9. Function that goes through a binary tree using post-order traversal
  10. Function that measures the height of a binary tree
  11. Function that measures the depth of a node in a binary tree
  12. Function that measures the size of a binary tree
  13. Function that counts the leaves in a binary tree
  14. Function that counts the nodes with at least 1 child in a binary tree
  15. Function that measures the balance factor of a binary tree
  16. Function that checks if a binary tree is full
  17. Function that checks if a binary tree is perfect
  18. Function that finds the sibling of a node
  19. Function that finds the uncle of a node
  20. Function that finds the lowest common ancestor of two nodes
  21. Function that goes through a binary tree using level-order traversal
  22. Function that checks if a binary tree is complete
  23. Function that performs a left-rotation on a binary tree
  24. Function that performs a right-rotation on a binary tree
  25. Function that checks if a binary tree is a valid Binary Search Tree
  26. Function that inserts a value in a Binary Search Tree
  27. Function that builds a Binary Search Tree from an array
  28. Function that searches for a value in a Binary Search Tree
  29. Function that removes a node from a Binary Search Tree
  30. What are the average time complexities of those operations on a Binary Search Tree
  31. Function that checks if a binary tree is a valid AVL Tree
  32. Function that inserts a value in an AVL Tree
  33. Function that builds an AVL tree from an array
  34. Function that removes a node from an AVL tree
  35. Function that builds an AVL tree from an array
  36. What are the average time complexities of those operations on an AVL Tree
  37. Function that checks if a binary tree is a valid Max Binary Heap (Task in progress)
  38. Function that inserts a value in Max Binary Heap (Task in progress)
  39. Function that builds a Max Binary Heap tree from an array (Task in progress)
  40. Function that extracts the root node of a Max Binary Heap (Task in progress)
  41. Function that converts a Binary Max Heap to a sorted array of integers (Task in progress)
  42. What are the average time complexities of those operation

Authors

  1. Getinet Amare
  2. Asefa Mulusew

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages