parent
aad3cd7f45
commit
a2539333a0
|
|
@ -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)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue