@@ -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)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
-----------------------
|
||||
|
||||
Reference in New Issue
Block a user