Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Trees

In this Repo I created a Tree class From scratch that has different
methods:

  • insert() -> add new node to the tree
  • find(node) -> travers the tree untill finding the node else return null
  • traversePreOrder() -> trever the node in Depth first search
  • traversePostOrder() -> trever the node in Depth first search
  • traverseInorder()-> trever the node in Depth first search
  • BreathFirstSearch() -> traverse the tree in Breath first search and print them
  • hieght() -> return the height of the tree
  • getMin() -> return the smallest value in the tree
  • equals() -> compare tow trees for equality
  • isBindarySearchTree() -> vlaidate the tree that it is a bindary search tree
  • printKthNodeAtDistance() -> print kth node at distance
  • isLeaf() -> uitl mehtod to vlaidate that a given node is the last node in the tree or a sub tee

REES REES REES

About

In this Repo. I created a Tree class From scratch that has different methods: insert(), find(), traversePreOrder(), traversePostOrder(), traverseInorder, BreathFirstSearch(), hieght(), getMin(), equals(), isBindarySearchTree(), printKthNodeAtDistance() [ print kth node at distance ], isLeaf()

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages