Wireless Sensor Network (WSN) consists of a number of sensor nodes for monitoring the environment. Scenario like floods, volcanic eruptions, earthquakes, tsunamis, avalanches, hailstorms and blizzards causes the sensor nodes to be damaged. In such worst case scenario, the deployed nodes in the monitoring area may split up into several segments. As a result sensor nodes in the network cannot communicate with each other due to partitions. The authors' algorithm investigates a strategy for restoring such kind of damage through either placement of Relay Nodes (RN's) or repositioning the existing nodes in the network.