From 26c46c03611010ef5fc7e3813423ac0b6d4ae95d Mon Sep 17 00:00:00 2001 From: Anurag Bhardwaj Date: Sun, 25 Oct 2020 15:47:10 +0530 Subject: [PATCH] fix: remove redundant code from find_max_connects_in_matrix_of_0s_and_1s --- .../find_max_connects_in_matrix_of_0s_and_1s.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/chapter02-recursion-and-backtracking/find_max_connects_in_matrix_of_0s_and_1s.go b/chapter02-recursion-and-backtracking/find_max_connects_in_matrix_of_0s_and_1s.go index a47a7ff..edcf7c7 100644 --- a/chapter02-recursion-and-backtracking/find_max_connects_in_matrix_of_0s_and_1s.go +++ b/chapter02-recursion-and-backtracking/find_max_connects_in_matrix_of_0s_and_1s.go @@ -73,11 +73,5 @@ func main() { } } - maxConnects := 0 - for r := 0; r < M; r++ { - for c := 0; c < N; c++ { - maxConnects = max(maxConnects, findConnects(matrix, M, N, r, c)) - } - } fmt.Println(findMaxConnects(matrix, M, N)) }