Skip to content

Commit c945599

Browse files
committed
Day 18: remove unnecessary returns
1 parent b9c1388 commit c945599

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

day18/searchMatrix2.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def searchMatrix(matrix, target)
22
# the downside to this is that I do a binary search
33
# on every row before I return
4-
return matrix.map {|row| binarySearch(row, target)}.any? {|result| result == true}
4+
matrix.map {|row| binarySearch(row, target)}.any? {|result| result == true}
55
end
66

77
###########
@@ -22,7 +22,7 @@ def binarySearch(row, target)
2222
end
2323
end
2424

25-
return false
25+
false
2626
end
2727

2828
#########

0 commit comments

Comments
 (0)