mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-24 09:07:14 +00:00
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:
@@ -33,7 +33,7 @@ fun printLinkedList(h: ListNode?) {
|
||||
var head = h
|
||||
val list = mutableListOf<String>()
|
||||
while (head != null) {
|
||||
list.add(head.value.toString())
|
||||
list.add(head._val.toString())
|
||||
head = head.next
|
||||
}
|
||||
println(list.joinToString(separator = " -> "))
|
||||
@@ -70,7 +70,7 @@ fun printTree(root: TreeNode?, prev: Trunk?, isRight: Boolean) {
|
||||
}
|
||||
|
||||
showTrunks(trunk)
|
||||
println(" ${root.value}")
|
||||
println(" ${root._val}")
|
||||
|
||||
if (prev != null) {
|
||||
prev.str = prevStr
|
||||
|
||||
Reference in New Issue
Block a user