β back to unit
Challenge
# puzzle gauntlet advanced
Streak Keeper of Every Team
One messy season log, many teams β find the longest win streak ANY team ever put together. π
You get the games log as team:W or team:L entries in season order (one clear best streak). A team's streak counts CONSECUTIVE wins in its own games. Print <team> <streak>.
Example:
Input: games = ["lions:W", "bears:W", "lions:W", "bears:L", "lions:W", "bears:W"]
Output: lions 3
Tracking each team's current streak separately, lions wins three games in a row (all three of their appearances are W) β the longest streak of any team.
π‘ need a hint?
pg-streak-keeper.pyπ given lines are locked β write your code in between
loading...