You are viewing a single comment's thread. Return to all comments →
Kotlin Solution
fun pageCount(n: Int, p: Int): Int { val numberOfPages = 1+n/2 val pageCountLeft = p/2 val pageCountRight = numberOfPages - p/2 - 1 return minOf(pageCountLeft, pageCountRight) }
Seems like cookies are disabled on this browser, please enable them to open this website
Drawing Book
You are viewing a single comment's thread. Return to all comments →
Kotlin Solution