mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
add type for each go and js code block
This commit is contained in:
@ -215,7 +215,7 @@ class TreeNode:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Go:
|
Go:
|
||||||
```
|
```go
|
||||||
type TreeNode struct {
|
type TreeNode struct {
|
||||||
Val int
|
Val int
|
||||||
Left *TreeNode
|
Left *TreeNode
|
||||||
@ -224,7 +224,7 @@ type TreeNode struct {
|
|||||||
```
|
```
|
||||||
|
|
||||||
JavaScript:
|
JavaScript:
|
||||||
```
|
```javascript
|
||||||
function TreeNode(val, left, right) {
|
function TreeNode(val, left, right) {
|
||||||
this.val = (val===undefined ? 0 : val)
|
this.val = (val===undefined ? 0 : val)
|
||||||
this.left = (left===undefined ? null : left)
|
this.left = (left===undefined ? null : left)
|
||||||
|
Reference in New Issue
Block a user