(self, rawList, target)
| 75 | """ |
| 76 | class Solution(object): |
| 77 | def binarySearch2(self, rawList, target): |
| 78 | split = len(rawList) // 2 |
| 79 | |
| 80 | left = rawList[:split] |
| 81 | right = rawList[split:] |
| 82 | |
| 83 | if not left and not right: |
| 84 | return False |
| 85 | |
| 86 | if left and left[-1] == target: |
| 87 | return True |
| 88 | |
| 89 | if right and right[0] == target: |
| 90 | return True |
| 91 | |
| 92 | if len(left) > 1 and left[-1] > target: |
| 93 | return self.binarySearch2(left, target) |
| 94 | |
| 95 | if len(right) > 1 and right[0] < target: |
| 96 | return self.binarySearch2(right, target) |
| 97 | |
| 98 | return False |
| 99 | |
| 100 | def searchMatrix(self, matrix, target): |
| 101 |
nothing calls this directly
no outgoing calls
no test coverage detected