yangshun / lago

📕 Data Structures and Algorithms library in TypeScript and JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add BinaryTreeNode

mauris opened this issue · comments

commented

In order to implement the other tree data structures, we need another node class that allows just to represent it's left-subtree and right-subtree. Preferably, this node will also take into account certain properties, such as length: number of nodes in its subtree.

  • BinaryTreeNode class:
    • constructor()
    • val
    • left
    • right
    • isLeaf()
commented

done in #34