When a major holiday is approaching, some people send cards to their friends. Unfortunately, some people forget a few of their friends, and are embarrassed to receive a card from them without having sent one. So, they follow by sending a card to those who were forgotten the first time around.
You are given a String[] friends, where the j-th character of the i-th element is a 'Y' or 'N', indicating whether or not person i sent a card to person j.
You are to return an int indicating the number of cards that get sent after the fact, when people realize they have forgotten one or more of their friends.
|