Map Validation Algorithm

To check if path is broken or not...