Merge pull request #592 from hjwforever/patch-2

upt: edit 二叉树理论基础.md
This commit is contained in:
程序员Carl
2021-08-13 09:38:39 +08:00
committed by GitHub

View File

@ -223,6 +223,14 @@ type TreeNode struct {
} }
``` ```
JavaScript
```
function TreeNode(val, left, right) {
this.val = (val===undefined ? 0 : val)
this.left = (left===undefined ? null : left)
this.right = (right===undefined ? null : right)
}
```
----------------------- -----------------------