https://kotlinlang.org logo
Title
u

user

07/04/2022, 3:51 AM
kotlin - how to modify an integer variable newbie in kotlin and trying to solve https://leetcode.com/problems/sum-root-to-leaf-numbers/ with it. hitting a kotlin constraint that declared val are final /** * Example: * var ti = TreeNode(5) * var v = ti.
val
* Definition for a binary tree node. * class TreeNode(var `val`: Int) { * var left: TreeNode? = null * var right: TreeNode? = null * } */ class Solution { fun...