feat(Kotlin): Replace value with _val (#1254)

* ci(kotlin): Add workflow file.

* Update kotlin.yml

* style(kotlin): value -> _val

---------

Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
curtishd
2024-04-10 18:09:43 +08:00
committed by GitHub
parent 39e2e1a5c1
commit 1623e3c6a8
28 changed files with 152 additions and 152 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ var list = mutableListOf<Int>()
fun preOrder(root: TreeNode?) {
if (root == null) return
// 访问优先级:根节点 -> 左子树 -> 右子树
list.add(root.value)
list.add(root._val)
preOrder(root.left)
preOrder(root.right)
}
@@ -26,7 +26,7 @@ fun inOrder(root: TreeNode?) {
if (root == null) return
// 访问优先级:左子树 -> 根节点 -> 右子树
inOrder(root.left)
list.add(root.value)
list.add(root._val)
inOrder(root.right)
}
@@ -36,7 +36,7 @@ fun postOrder(root: TreeNode?) {
// 访问优先级:左子树 -> 右子树 -> 根节点
postOrder(root.left)
postOrder(root.right)
list.add(root.value)
list.add(root._val)
}
/* Driver Code */