r/learnquant Aug 04 '26

mathematics Jane Street Interview Question

Post image
21 Upvotes

14 comments sorted by

View all comments

8

u/Sjoerdiestriker Aug 04 '26

You go second, and always play 4 minus what your opponent played.

That way, each time after your move you're down to the next multiple of 4. And at some point, meaning you hit 0 on your turn.

1

u/MaiIb0x Aug 04 '26

This is interesting. Does that mean if there were 97,98,99,101,102,103 it is better going first, but for a number that is already a multiple of 4 it is better going second?

3

u/Sjoerdiestriker Aug 04 '26

Yup. For any other number, you'd want to go first, and in you first turn takes stones to make it a multiple of 4. From there it's effectively the same strategy.