com_github_leetcode.left_right.Node.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leetcode-in-kotlin Show documentation
Show all versions of leetcode-in-kotlin Show documentation
Kotlin-based LeetCode algorithm problem solutions, regularly updated
package com_github_leetcode.left_right
class Node(var `val`: Int) {
constructor(i: Int, node: Node?, node1: Node?, nothing: Node?) : this(i) {
this.left = node
this.right = node1
this.next = nothing
}
var left: Node? = null
var right: Node? = null
var next: Node? = null
override fun toString(): String {
return "Node{val=$`val`,left=$left,right=$right,next=$next}"
}
}