Amazon Interview Question
Principal Software EngineersCountry: United States
Interview Type: Phone Interview
I guess the question is given the initial position of 2 knights which one of them will win.
A logic similar to BFS can be used to find out min number of steps needed to go from 1 cell to another. Once you reach the bottom of the cell stop.
Do the same for the other knight. The one with lesser number of steps is the winner.
LOL what? Input from user?
- S O U N D W A V E March 10, 2014Right end? Second corner?
Which reaches first? HUH