🆗 添加2025年调休与节假日配置

🆗 调整样式兼容手机端访问
This commit is contained in:
2024-11-29 16:04:56 +08:00
parent 1d94c923bd
commit 25d326e4a7
9 changed files with 163 additions and 20 deletions

38
src/test/kotlin/Test.kt Normal file
View File

@@ -0,0 +1,38 @@
import java.util.*
fun main() {
var ti = TreeNode(2)
var v = ti.`val`
ti.right = TreeNode(4)
ti.left = TreeNode(3)
ti.left!!.left = TreeNode(1)
println(inorderTraversal(ti))
}
fun inorderTraversal(root: TreeNode?): List<Int> {
var copyroot = root
val list: MutableList<Int> = ArrayList()
val stack = Stack<TreeNode>()
while (copyroot != null || !stack.isEmpty()) {
while (copyroot != null) {
stack.push(copyroot)
copyroot = copyroot.left
}
copyroot = stack.pop()
list.add(copyroot.`val`)
copyroot = copyroot.right
}
return list
}
class TreeNode(var `val`: Int) {
var left: TreeNode? = null
var right: TreeNode? = null
}