From ea753ad0b3e5779ba34d8f879b3481b783eede51 Mon Sep 17 00:00:00 2001 From: isaiahliu Date: Thu, 19 Dec 2024 00:06:29 +0800 Subject: [PATCH] 1 --- src/main/kotlin/p32xx/Problem3285.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/main/kotlin/p32xx/Problem3285.kt diff --git a/src/main/kotlin/p32xx/Problem3285.kt b/src/main/kotlin/p32xx/Problem3285.kt new file mode 100644 index 00000000..76610e23 --- /dev/null +++ b/src/main/kotlin/p32xx/Problem3285.kt @@ -0,0 +1,17 @@ +package p32xx + +import util.expect + +fun main() { + class Solution { + fun stableMountains(height: IntArray, threshold: Int): List { + return (1 until height.size).filter { height[it - 1] > threshold } + } + } + + expect { + Solution().stableMountains( + intArrayOf(), 5 + ) + } +}