We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9c1388 commit c945599Copy full SHA for c945599
day18/searchMatrix2.rb
@@ -1,7 +1,7 @@
1
def searchMatrix(matrix, target)
2
# the downside to this is that I do a binary search
3
# on every row before I return
4
- return matrix.map {|row| binarySearch(row, target)}.any? {|result| result == true}
+ matrix.map {|row| binarySearch(row, target)}.any? {|result| result == true}
5
end
6
7
###########
@@ -22,7 +22,7 @@ def binarySearch(row, target)
22
23
24
25
- return false
+ false
26
27
28
#########
0 commit comments