Log Date

Welcome to techInterview, a site for technical interview questions, brain teasers, puzzles, quizzles (whatever the heck those are) and other things that make you think!

1. Text post

### Nuggets

You can go to a fast food restaurant to buy chicken nuggets in 6-pack, 9-pack or 20-packs. is there such a number N, such that for all numbers bigger than or equal to N, you can buy that number of chicken nuggets?

### Solution

Here’s another way of looking at it:

` 1  2  3 4  5  6 7  8  910 11 1213 14 1516 17 1819 20 2122 23 2425 26 2728 29 3031 32 3334 35 3637 38 3940 41 4243 44 45(and so on, to infinity)`

You can get any number in the right column except 3 by adding 6s and 9s. So cross out the entire right column except 3. You can also add 20 to any crossed-out number and cross that number out. So cross out everything in column two below and including 26. Finally, by the same logic you can add 20 to the crossed-out numbers in column 2 and thereby cross out everything in column one below and including 46.

The largest number that’s left over is 43. Incidentally, cross out 20 and 40 and your map is complete.