![JAR search and dependency download from the Maven repository](/logo.png)
g1201_1300.s1227_airplane_seat_assignment_probability.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 g1201_1300.s1227_airplane_seat_assignment_probability
// #Medium #Dynamic_Programming #Math #Brainteaser #Probability_and_Statistics
// #2023_06_09_Time_135_ms_(100.00%)_Space_33.3_MB_(100.00%)
class Solution {
fun nthPersonGetsNthSeat(n: Int): Double {
return if (n == 1) {
1.0
} else 0.5
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy