Skip to main content

One post tagged with "part-3"

View All Tags

· 5 min read
Trayi Murti

Let's increase problem level further.

Problem​

Given a grid of integers L = [[A1,1, A1,2, A1,3, ..., A1,M], [A2,1, A2,1, A2,3, ..., A2,M], [A3,1, A3,2, A3,3, ..., A3,M], [..., ..., ..., ..., ...], [AN,1, AN,2, AN,3, ..., AN,M]]. Where Ai,j ≥ 0, 0 ≤ i ≤ N, 0 ≤ j ≤ M. You have to find the least perimeter of rectangle which adds up to a given integer K.