Hi, I found the following conflicting problem: according to k & B : "if a collection/array you want to search was sorted using a Comparator,it must be searched using the same Comparator, which is passed as the second argument..."
Now I wrote a program:
Even though second time while searching I am passing only List and Object need to search..!! I was expecting some unexpecting behavior..!! But I was shocked It gave me right answer ?
Can some one explain me..how binary search behave behind the codes!!