From 186d6880dba314489c142f73d8a54b14a5f3bc21 Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Sat, 24 Feb 2018 17:35:43 -0800 Subject: [PATCH] Rename dfs extension function --- utilities/python/graph_dfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/python/graph_dfs.py b/utilities/python/graph_dfs.py index 2b9ab415..412ff7d4 100644 --- a/utilities/python/graph_dfs.py +++ b/utilities/python/graph_dfs.py @@ -20,7 +20,7 @@ def graph_dfs(matrix): # Follow up: # 1) Diagonal cells are considered neighbors # 2) View the matrix like Earth, right boundary is adjacent to the left boundary, top adjacent to left, etc. -def graph_dfs_diagonals(matrix): +def graph_dfs_diagonals_and_boundary_wrap(matrix): rows, cols = len(matrix), len(matrix[0]) visited = set() # Change 1: Add 4 more diagonal directions.