IMC Interview Question
first round: 1) Given the chess board size, knight starting position, end position, and bishop position, find the minimum number of moves for the knight to move from its starting position to the end position. The knight cannot move on any square that the bishop is attacking, but it can go on those squares if the knight captures the bishop. 2) Implement a stack with the functions pop, push, inc, isEmpty, and peek. The inc function increases the first n elements of the stack by a value i.
Unlock the Full Solution
Enter your email to get instant access to the complete solution, explanation, and similar practice problems.