1025. Divisor Game


time: O(1)
space:O(1)
class Solution {
    public boolean divisorGame(int n) {
        return n%2 == 0;
    }
}
//alice first, n-x, n%x==0
/*
n=2, 
n=4
4 3 2 1
1 1 1 1
1 
*/Last updated
Was this helpful?


time: O(1)
space:O(1)
class Solution {
    public boolean divisorGame(int n) {
        return n%2 == 0;
    }
}
//alice first, n-x, n%x==0
/*
n=2, 
n=4
4 3 2 1
1 1 1 1
1 
*/Last updated
Was this helpful?