Preparing for Disaster: Leveraging Precomputation to Efficiently Repair Graph Structures Upon Failures