β back to unit
Challenge
# searching advanced
Longest Winning Streak
Your team's season is one long story of W's and L's. π
You get the season as a list of results, each W or L. Print the longest run of W's in a row (0 if the team never won).
Example:
Input: results = ["W", "W", "L", "W", "W", "W", "L"]
Output: 3
The streaks are W,W (length 2), then a reset, then W,W,W (length 3) β the longest is 3.
π‘ need a hint?
srch-longest-win-streak.pyπ given lines are locked β write your code in between
loading...