https://github.com/neuodev/trees
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()
https://github.com/neuodev/trees
Last synced: 3 months ago
JSON representation
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()
- Host: GitHub
- URL: https://github.com/neuodev/trees
- Owner: neuodev
- Created: 2021-04-02T07:02:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-02T07:10:59.000Z (over 5 years ago)
- Last Synced: 2025-03-02T07:02:47.055Z (over 1 year ago)
- Language: TypeScript
- Size: 157 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### 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


