Problem Statement | |||||||||||||
A teacher wants to take his students to see a movie at the theater. The only problem is that the students talk a lot, so the teacher doesn't want any two students in the same row to sit in adjacent seats. You are given a String[] seats which contains information about which seats are available for purchase. Character j of element i of seats is 'Y' if the j-th seat in row i is available, or 'N' otherwise. Return the maximum number of students who can watch the movie. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | seats will contain between 1 and 50 elements, inclusive. | ||||||||||||
- | Each element of seats will contain between 1 and 50 characters, inclusive. | ||||||||||||
- | All elements of seats will be of equal length. | ||||||||||||
- | Each element of seats will contain only 'Y' or 'N' characters. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
|