You're given a string of 0s and 1s representing a football situation. A situation is dangerous if there are 7 or more consecutive identical characters. Your task: determine if the string is dangerous.
I'll show you how to track consecutive elements using a loop. You need to iterate through the string, count identical neighbors, and detect when the count reaches 7. This pattern appears in many problems where you scan sequences.
Read the problem statement before continuing. Think about how you'd solve this by hand. What information do you need to track while scanning the string?