The Trade Desk Interview Question

4th on-site task - the interview with a higher tech manager - he asked to implement the algorithm to play Mastermind game, so that it would be solved in 12 turns or less.

Interview Answer

Anonymous

Aug 2, 2019

First we discussed the initial approach and the algorithm in whole; I came to one of the possible solutions. The interviewer was well prepared and gave a few hints when I was starting to move in a wrong direction. Then he left the room and let me code for like 10 minutes. I've implemented first half - determining the colors and their numbers, and then he returned to read the code, while I was doing the second part - determining the color positions. I didn't completely finish that, and seems like he was not happy that the second part of the algorithm fulfilled the task, but there was a more simple solution for that part. I think the interviewer considered this task as non-passed.