Find grid cell minimizing sum distances | Applied Intuition Interview Question