• + 0 comments

    C++ (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master , feel free to give a star :) )

    std::string nimbleGame(std::vector<int> _squares){
        int binSum = 0;
        for(auto i = 0; i != _squares.size(); ++i){
            if(_squares[i] % 2 == 1){
                binSum ^= i;
            }
        }
        return binSum ? "First" : "Second";
    }