The Trade Desk interview question

Write code to solve the mastermind game in 12 turns or less.