From 0e36a184c2bfd37c218c8254ff19f3ec601bc85b Mon Sep 17 00:00:00 2001 From: Alan Geirnaert Date: Wed, 25 Mar 2026 22:20:31 +0100 Subject: [PATCH 1/2] chore: updated README file with today's github link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b66ac7..3ec3bd1 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Feel free to explore, learn, and share your own approaches. - [x] **3/22:** Water Day πŸ’§ - [x] **3/23:** Cuddly Kittens 🐈 - [x] **3/24:** Earthquake Anomaly 🌏 -- [x] **3/25:** Opening Day ⚾️ +- [x] **3/25:** [Opening Day](https://github.com/codedex-io/daily-challenges/tree/main/march-2026/3-25-opening-day) ⚾️ - [ ] **3/26:** ❓❓❓ - [ ] **3/26:** ❓❓❓ - [ ] **3/28:** ❓❓❓ From 12bb81780f6edb62011656c94bd988713284bb9d Mon Sep 17 00:00:00 2001 From: Alan Geirnaert Date: Wed, 25 Mar 2026 22:20:40 +0100 Subject: [PATCH 2/2] feat: opening day python solution --- march-2026/3-25-opening-day/opening-day.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 march-2026/3-25-opening-day/opening-day.py diff --git a/march-2026/3-25-opening-day/opening-day.py b/march-2026/3-25-opening-day/opening-day.py new file mode 100644 index 0000000..fd6b9d2 --- /dev/null +++ b/march-2026/3-25-opening-day/opening-day.py @@ -0,0 +1,17 @@ +def streak_counter(games): + best_streak = 0 + current_streak = 0 + + # for each game + for game in games: + # if it's a win + if game == "W": + # add 1 to current streak and return highest value + # between best and current + current_streak += 1 + best_streak = max(best_streak, current_streak) + elif game == "L": + # else if lose current streak goes to 0 + current_streak = 0 + + return best_streak \ No newline at end of file