Shortest path between two points in coordinates system
<p>I have two points A and B. I want to find the shortest path from A to B, but there are N (up to 200) rectangles and the path cannot intersect any of those rectangles. Path and rectangles can intersect only at vertices of rectangles and at sides of rectangle. What is the length of the shortest path? Rectangles cannot intersect. They can share point or a side. So if there are two of them sharing a side then you can pass between them.</p>