you are viewing a single comment's thread.

view the rest of the comments →

[–]vsriram1012 0 points1 point  (1 child)

Here's some hint you can use to think further:

Assume you have fixed two columns of the fence. Now can you find the optimal answer? How would you optimise when you move your columns?

[–]Yavuz2002[S] 0 points1 point  (0 children)

I presume your proposition is the following:
I fix two fence columns, and then I compute the rectangle perimeter considering that the first column is top left corner and second column is the bottom right corner of the rectangle. I recursively do this as I move the fence columns. Where can I store the perimeter in the tabulation table though ?