mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
添加 二叉树理论基础.md Scala版本
This commit is contained in:
@ -258,6 +258,13 @@ class TreeNode<T> {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Scala:
|
||||
```scala
|
||||
class TreeNode(_value: Int = 0, _left: TreeNode = null, _right: TreeNode = null) {
|
||||
var value: Int = _value
|
||||
var left: TreeNode = _left
|
||||
var right: TreeNode = _right
|
||||
}
|
||||
```
|
||||
-----------------------
|
||||
<div align="center"><img src=https://code-thinking.cdn.bcebos.com/pics/01二维码一.jpg width=500> </img></div>
|
||||
|
Reference in New Issue
Block a user