Reported interview periodJun 2026–Jul 2026
Repair a Looping Instruction Program
A small virtual machine executes a list of instructions over one integer accumulator. Blank lines and comment lines are ignored.
Practice focus- plus n : add n to the accumulator and move to the next instruction. - next n : ignore n and move to the next instruction. - jump n : move to the instruction at current index + n . Execution halts when the program counter moves outside the instruction list. It loops when it is about to execute an instruction that has already run. Exactly one jump or next instruction was swapped while keeping its operand. Interface Return -1 from the first two functions if the original program already halts.…