Amazon-SDE Graduate Question
Anonymous User
1738

AWS stores servers in an nm grid. Each server is identified by a unique numeric serverId.
In the grid, servers are arranged in such a way that every row and column
is sorted in an increasing order.
Design an algorithm which can find out the faulty server & return
if it is “present” or “absent” in the grid.
The input to the function will be (a) n
m metrics & (b) faulty serverId as an input?

###Input:
Grid: {2, 7, 9, 11, 63}
{3, 10, 14, 17, 64}
{15, 25, 35, 55, 65}
{21, 27, 39, 58, 66}
{31, 38, 40, 88, 99}

Faulty ServerId: 39

Comments (1)