diff --git a/C++/flip-game-ii.cpp b/C++/flip-game-ii.cpp index affb920ca..4c0bc5f01 100644 --- a/C++/flip-game-ii.cpp +++ b/C++/flip-game-ii.cpp @@ -22,7 +22,7 @@ class Solution { // Find first missing number. g.emplace_back(x.find('+')); } - g_final ^= g[p]; // g[0], g[1] is always 0 + g_final ^= g[p]; } return g_final; // Theorem 1: First player must win iff g(current_state) != 0 }