We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c93e41 commit 68a2d4bCopy full SHA for 68a2d4b
src/main/kotlin/g3101_3200/s3130_find_all_possible_stable_binary_arrays_ii/Solution.kt
@@ -82,20 +82,6 @@ class Solution {
82
return ((x % mod) + mod) % mod
83
}
84
85
- fun quickPower(base: Long, power: Long, p: Long): Long {
86
- var base = base
87
- var power = power
88
- var result: Long = 1
89
- while (power > 0) {
90
- if ((power and 1L) == 1L) {
91
- result = result * base % p
92
- }
93
- power = power shr 1
94
- base = base * base % p
95
96
- return result
97
98
-
99
companion object {
100
private const val MOD = 1e9.toInt() + 7
101
private const val N = 1000
0 commit comments