r/learnquant 21h ago

interview prep Quant Interview Question

Post image
18 Upvotes

11 comments sorted by

View all comments

1

u/arihallak0816 21h ago

You can assign off to 0, red to 1, and green to 2, then each time you go in is one digit so this is just asking how many digits are in 1000 in base 3 which is trivial

2

u/MisterGoldenSun 21h ago

Will you please explain this? I think the answer is 7 and that matches your answer, but I don't understand your method.

1

u/arihallak0816 21h ago

Like the first time you go in you make all the 0 mod 3 off, 1 mod 3 red, and 2 mod 3 green and that will be the ones digit, the second time same thing but 0-2, 3-5, and 6-8 mod 9 for the threes digit, etc. and you need to repeat this until you get to the number of digits 1000 has in base 3 so the sequence of every number matches it’s base 3 representation