![JAR search and dependency download from the Maven repository](/logo.png)
g2501_2600.s2549_count_distinct_numbers_on_board.Solution.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 g2501_2600.s2549_count_distinct_numbers_on_board
// #Easy #Array #Hash_Table #Math #Simulation #2023_07_06_Time_113_ms_(100.00%)_Space_33_MB_(66.67%)
class Solution {
fun distinctIntegers(n: Int): Int {
return 1.coerceAtLeast(n - 1)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy