Please Run this solution with given test case and tell me the issue


#1

TEST CASE: 4 9 1 4 5 5 6 14 14 16 19 22 24 28 33 35 37 38 40 41 45 50 52 55 56 56 57 60 60 63 64 66 68 68 71 78 78 79 84 89 90 91 93 94 94 97 98
68

def searchMatrix(self, A, B):
bottom=len(A)-1
right=len(A[0])-1
left=0
top=0
row=0
while(top<=bottom):
mid=(top+bottom)//2
if(B==A[mid][0]):
return 1
elif(B > A[mid][0]):
top=mid+1
row=mid
elif(B < A[mid][0]):
bottom=mid-1
row=mid
print(row)
while(left<=right):
mid=(right+left)//2
print(A[row][mid])
print(A[row][mid] == B)
if(A[row][mid] == B):
return 1
elif(B > A[row][mid]):
left=mid+1
elif(B < A[row][mid]):
right=mid-1
return 0

The issue is it checks for the A[row][mid] with B and it actually gets to the value where A[row][mid]=68 and B=68 but it say it False and return 0 after running. According to compiler 68!=68. Please tell me what is the issue