Question Description. Link
Below we will define an
n-interesting polygon. Your task is to find the area of a polygon for a givenn.A
1-interesting polygon is just a square with a side of length1. Ann-interesting polygon is obtained by taking then - 1-interesting polygon and appending1-interesting polygons to its rim, side by side. You can see the1-,2-,3- and4-interesting polygons in the picture below.
- For
n = 2, the output should beshapeArea(n) = 5 - For
n = 3, the output should beshapeArea(n) = 13
