mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 08:50:15 +08:00
@ -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