Bootloader Infinite Loop Detection
Given a set of bootloader instructions (Jump, Plus, Next), determine if the instruction sequence contains an infinite loop. If a loop is detected, find the single instruction swap (Next to Jump or vice versa) that eliminates it.
Asked at:
Anthropic
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early November, 2026
Anthropic
Senior
There are 3 operations: Jump, 4 Plus, -1 Next, 5(this value doesn't matter) Given an input of these instructions, how to make sure there are no infinite instruction loops. How to swap a next with a jump or vice versa to remove the loop.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.