Question: We have an NxM grid there are two animals one is Horse and another is Bishop which has different moving abilities. A Horse can move
- We have an NxM grid there are two animals one is Horse and another is Bishop which has different moving abilities. A Horse can move 2.5 steps and a Bishop can move only diagonal but not horizontally or vertically. Some grids are marked as inactive. Return 1 position where these animals can meet at any point. In the following image 0,3 & 2,0 are represented as an inactive grid where none of the animals can visit and Bishop is at 3,2 position and possible direction are represented as arrow and Horse is available at 6,6 and possible direction where horse can move are represented as arrow and circles. One of the possible point where the Bishop and Horse can meet is 4,5 as represented by yellow color. You need to use your own data structure, data types and test cases asper the requirement. (Hint: use graph algorithm - BFS). PS: Chess knowledge is not required to solve this problem*

0 1 1 2 0 3 4 5 6 7 2 3 4 5 9 7 2
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
