Problem Statement | |||||||||||||
The doctor has given you your diet, in which each character corresponds to some food that you should eat. You also know what you have eaten for breakfast and lunch, in which each character corresponds to a type of food that you have already eaten that day. You have decided that you will eat all of the remaining food in your diet during dinner, and you want to return that as a String (sorted in alphabetical order). If you have cheated in anyway (either by eating too much of one type of food, or by eating some food that is not in the dietPlan), you should return the String "CHEATER" (quotes for clarity). | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | diet will contain between 0 and 26 characters, inclusive. | ||||||||||||
- | Each character in diet will be an uppercase letter ('A'-'Z'). | ||||||||||||
- | There will be no duplicate characters in diet. | ||||||||||||
- | breakfast will contain between 0 and 26 characters, inclusive. | ||||||||||||
- | Each character in breakfast will be an uppercase letter ('A'-'Z'). | ||||||||||||
- | lunch will contain between 0 and 26 characters, inclusive. | ||||||||||||
- | Each character in lunch will be an uppercase letter ('A'-'Z'). | ||||||||||||
- | There will be no duplicate characters in breakfast. | ||||||||||||
- | There will be no duplicate characters in lunch. | ||||||||||||
- | No character will appear in both breakfast and lunch. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
| |||||||||||||
4) | |||||||||||||
|