eBay Interview Question

1. Write program to identify if two subnets collide.