After LLNode and LinkedList, professor taught us a new class which was rooted at binary tree.It is called BTNode.
BTNode contains three parts: an object which is the root of BST, and left, a BST, right , also a BST.For BTNode, if it only has numbers, the sorting step will be much easier. As the left tree only contains smaller number whereas right tree only contains larger number.
No comments:
Post a Comment