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
@@ -41,7 +41,7 @@ fun find(head: ListNode?, target: Int): Int {
var index = 0
var h = head
while (h != null) {
if (h.value == target)
if (h._val == target)
return index
h = h.next
index++
@@ -79,7 +79,7 @@ fun main() {
/* 访问节点 */
val node: ListNode = access(n0, 3)!!
println("链表中索引 3 处的节点的值 = ${node.value}")
println("链表中索引 3 处的节点的值 = ${node._val}")
/* 查找节点 */
val index: Int = find(n0, 2)