From 242ab0657cb56922e8faa718a11eb15ab9c91e82 Mon Sep 17 00:00:00 2001 From: Luc Rubio Date: Wed, 4 Dec 2024 23:07:07 +0100 Subject: [PATCH] Correct AoC2024.4.1 runtime --- aoc2024/src/day04/python/solution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aoc2024/src/day04/python/solution.py b/aoc2024/src/day04/python/solution.py index 8b86fbb..e594772 100644 --- a/aoc2024/src/day04/python/solution.py +++ b/aoc2024/src/day04/python/solution.py @@ -53,7 +53,7 @@ def count_xmas_words(input: Sequence[str]) -> int: The word XMAS may appear horizontally, vertically and diagonally. It may appear reversed SMAX too. - Time complexity: O(n*nm) + O(m+n) = O(n^2m) + Time complexity: O(nm) + O(2(m+n)) = O(nm) Space complexity: O(n+m) """ lines = _extract_all_lines(input)