Compute optimal locker placement with obstacles | Amazon Interview Question