I have an NxM grid there are two chess pieces one is 'Knight' and another is 'Bishop' which has different moving abilities. As we all know 'Knight' can move 2.5 steps and a 'Bishop' can move only diagonal but not horizontally or vertically. Some grids are inactive(Occupied by other chess pieces). I wanted to Return 1 position where the knight and bishop can attack.
For example: We have an 8*8 grid. 0,3 & 2,0 are inactive grids(I mean occupied by other pieces). 'Bishop' is at 3,2 position and possible direction are represented as arrow and 'Knight' is available at 6,6 and possible direction where knight can move are represented as arrow and circles. One of the possible point where the Bishop and Knight can meet is 4,5 as represented by yellow color. The reference image is attached.
Bu iş için 9 freelancer ortalamada ₹1172 teklif veriyor
Hi there! I am an experienced C/C++/Python/Java programmer and an expert in data structures and algorithms. I believe i can help you and deliver your project at the earliest. Message me so that we can proceed further.
Hi there! I have had a good read in the problem description. The algorithm I came up with is, first, the knight should be moved towards the bishop as near as possible. Than the bishop should moved to the place where kn Daha Fazla
I am a competitive programmer (proficient in C++) with good problem solving skills (currently, a 6 star, 2248 rated on CodeChef, ranked 933 worldwide).
I have been a competitive programmer (CodeChef and HackerRank) and I am pretty much sure that I have solved this problem earlier, I can tell you the solution in C++.
Hib, I am a CS graduate. I can write you this code in a simple and efficient way. Kindly message me to give away the project.
I have understood this problem quite clearly and already came up with a solution in my mind which i can explain you very effectively. I have excellent programming and logical skills, i have achieved an all India rank o Daha Fazla
I have already completed this question and solution is ready with me. Using java I have completed this question. A 'Horse' can move 2.5 steps and a 'Bishop' can move only diagonal but not horizontally or vertically. So Daha Fazla