Dandy (NY) interview question

compute distance between two shapes.