The sample test is working fine but the test cases of the question is not working please help me out. https://ide.codingblocks.com/s/231149
Error in the code. help me out
@ayusdas2000
you are calculating Grundy(m) lots of times
Use the property of xor
m^m^m^m…even times ans=0 and odd times ans=m.
to solve in O(1) for n stones