Given a list of moving directions, among them 0° stands for east, 180° for west, 90° for north and 270° for south. The starting point is the Given a list…
On a Cartesian coordinate system, a rectangle can be described as a two-dimensional set: ( (x1, y1), (x2, y2)), where (x1, y1) is the coordinate of its bottom-left corner, and (x2, y2) is the coordinate…