From 454288e241d8ff13b4d65fa332c87d6b25aa5868 Mon Sep 17 00:00:00 2001 From: SSinha1234 Date: Mon, 24 Aug 2026 21:59:44 +0530 Subject: [PATCH] fix: correct typo in word search directions --- backtracking/word_search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backtracking/word_search.py b/backtracking/word_search.py index 8a9b2f1b5359..4b13051bb045 100644 --- a/backtracking/word_search.py +++ b/backtracking/word_search.py @@ -66,10 +66,10 @@ def exits_word( if word_index == len(word) - 1: return True - traverts_directions = [(0, 1), (0, -1), (-1, 0), (1, 0)] + traverse_directions = [(0, 1), (0, -1), (-1, 0), (1, 0)] len_board = len(board) len_board_column = len(board[0]) - for direction in traverts_directions: + for direction in traverse_directions: next_i = row + direction[0] next_j = column + direction[1] if not (0 <= next_i < len_board and 0 <= next_j < len_board_column):