From bc4063dda836cb76888068cc3aa8ac55bb8d9318 Mon Sep 17 00:00:00 2001 From: Michael Mutote <130656746+mr1Michael@users.noreply.github.com> Date: Sun, 12 Nov 2023 19:46:57 +0100 Subject: [PATCH] 22202956 ex 4.9 q 4 had to be made into backtracking --- 4_9_Exercises/Question 4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4_9_Exercises/Question 4.py b/4_9_Exercises/Question 4.py index 119f617..124d103 100644 --- a/4_9_Exercises/Question 4.py +++ b/4_9_Exercises/Question 4.py @@ -18,7 +18,7 @@ def np(x, y): for pos in new_pos: if (pos not in current) and ((0 <= pos[0] <= x) and (0 <= pos[1] <= y)): trace.append(current + [pos]) - return final + return len(final) def np2(x, y, trace=None): -- GitLab