Expedia Interview Question
Software Engineer / DevelopersCountry: India
Interview Type: Phone Interview
So you are given a N-by-M matrix and the coordinate (say (x, y)) of a dot, you want to find if 0<=x<=(N-1) and 0<=y<=(M-1) ? Is this the question??
The first follow up question should be for this. Could it be assumed that matrix has it left bottom corner at (0,0) co-ordinate in x-y plane? If that's true the answer is correct otherwise not.
This seems very easy. If it were easy, it should not have been written. If you found it difficult, you have not explained to the audience well.
- HS August 29, 2012