mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-09 14:06:06 +00:00
Add kotlin code for chapter_stack_and_queue and chapter_tree (#1197)
* Add kotlin code block for chapter_hashing * Add kotlin code block for chapter_heap. * Add kotlin code block for chapter_stack_and_queue and chapter_tree * fix indentation * Update binary_tree.md --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@@ -203,7 +203,12 @@ AVL 树既是二叉搜索树,也是平衡二叉树,同时满足这两类二
|
||||
=== "Kotlin"
|
||||
|
||||
```kotlin title=""
|
||||
|
||||
/* AVL 树节点类 */
|
||||
class TreeNode(val _val: Int) { // 节点值
|
||||
val height: Int = 0 // 节点高度
|
||||
val left: TreeNode? = null // 左子节点
|
||||
val right: TreeNode? = null // 右子节点
|
||||
}
|
||||
```
|
||||
|
||||
=== "Zig"
|
||||
|
||||
Reference in New Issue
Block a user