LeetCode Collection

One-Liner Gallery

Problems whose shortest Kotlin or Rust solution is two nonblank lines or less.

65 tiny solutions
1122 unique problems
1268 entries

65 entries

Focused gallery for this signal, ordered by the strongest matching metric.

10.01.2023

easy

100. Same Tree

2 lines 167 chars · kotlin

fun isSameTree(p: TreeNode?, q: TreeNode?): Boolean = p == null && q == null ||