Dangerous String
A string contains ‘0’ and ‘1’.You have to find out whether the string is dangerous or not. The string will be dangerous in the following two conditions. There are at least 7 continuous occurrences of ‘1’. There are at least 7 continuous occurrences of ‘0’. Examples: Input : 1000000001 Output : YES Explanation: It has more than 7… Read More »