Hackerrank Folding Rectangular Paper. Given nn buildings, find the greatest such solid area formed by consecutive buildings. If you make 1 cut to a single piece, it will give rise to 1 extra piece.
One corner of a rectangular sheet of paper is folded over so as to reach the opposite edge (lengthwise) of the sheet. Next, fold along the width 2 units from the 4 unit edge to have 6 x 2. So we can cut 2 square of size 13 x 13 (29/13 = 2).