We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
"For example: 4 can be divided into [3], [1, 2] and [1, 1] games."
What about [2] ? IIII -> IIXX
Can you please explain this idea of xor'ing results of sub-games? I'm not sure about it.
Btw, how do you deal with duplicate sub-games? Fro example, [3,3] can became both [2,3] and [3,2]. and if they are win-states, their xor will be 0 as if both of them be fail-states. What's the poin of xoring here?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Bowling Pins
You are viewing a single comment's thread. Return to all comments →
"For example: 4 can be divided into [3], [1, 2] and [1, 1] games."
What about [2] ? IIII -> IIXX
Can you please explain this idea of xor'ing results of sub-games? I'm not sure about it.
Btw, how do you deal with duplicate sub-games? Fro example, [3,3] can became both [2,3] and [3,2]. and if they are win-states, their xor will be 0 as if both of them be fail-states. What's the poin of xoring here?