Booking.com Interview Question

HackerRank: average of point using Manhattan distance