Problem Statement | |||||||||||||
You have two cutout pieces of paper, each of which may have one or more sections missing. You wish to arrange those two pieces, possibly overlapping, to cover the largest possible rectangular area. Each of the pieces may be rotated (in 90 degree increments), or flipped over. You are given String[]s paper1 and paper2, where each character of each element is a '.' or an uppercase 'X' indicating whether or not the paper has a hole at that location, respectively. Return the area of the largest rectangular region you can cover using the two pieces of paper. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | paper1 will contain between 1 and 5 elements, inclusive. | ||||||||||||
- | Each element of paper1 will contain between 1 and 5 characters, inclusive. | ||||||||||||
- | Each element of paper1 will contain the same number of characters. | ||||||||||||
- | Each character of each element of paper1 will be uppercase 'X' or '.'. | ||||||||||||
- | paper2 will contain between 1 and 5 elements, inclusive. | ||||||||||||
- | Each element of paper2 will contain between 1 and 5 characters, inclusive. | ||||||||||||
- | Each element of paper2 will contain the same number of characters. | ||||||||||||
- | Each character of each element of paper2 will be uppercase 'X' or '.'. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
| |||||||||||||
4) | |||||||||||||
|