![JAR search and dependency download from the Maven repository](/logo.png)
g2601_2700.s2678_number_of_senior_citizens.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 g2601_2700.s2678_number_of_senior_citizens
// #Easy #Array #String #2023_07_27_Time_163_ms_(96.30%)_Space_36.8_MB_(70.37%)
class Solution {
fun countSeniors(details: Array): Int =
details.filter { it.substring(11, 13).toInt() > 60 }.size
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy