Harmit
BAN USER
Employee at None
Comments (4)
Reputation 10
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
1
of 1 vote
1. Use a modified version of binary search for first column (Lets name is as c1):
it return the position of the number if found
else return i such that c1[i]< searchItem < c1[i+1]
2. Now search for the searchItem if not found in the first step in ith row of the main array using binary search
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
0 9 0
- Harmit January 14, 20120 0 2
0 2 1
1 1 0
What about this? i am assuming that we are starting from 3,0.