Data Structures & AlgorithmsHardICPC regional · algorithm theory

Problem: By the Sprague-Grundy theorem, what is the Grundy value of a sum of independent impartial games?

  1. A. The sum of their Grundy values
  2. B. The XOR of their Grundy values
  3. C. The maximum of their Grundy values
  4. D. The product of their Grundy values

Correct answer: B. The XOR of their Grundy values

A sum of impartial games has Grundy value equal to the XOR of the component values, which determines the winner.

More Coding Interview Problems questions

Exams that ask this topic