PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Meta

Compute capacities after site closures

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to manipulate nested dictionary data structures and perform aggregate capacity computations, assessing data transformation, mapping, and set-based reasoning skills relevant to a Data Engineer within the Coding & Algorithms domain.

  • Medium
  • Meta
  • Coding & Algorithms
  • Data Engineer

Compute capacities after site closures

Company: Meta

Role: Data Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

You are given a nested dictionary redistribution where redistribution[closed_site][dest_site] equals the additional capacity required at dest_site if closed_site is shut down. The baseline capacity for each site s is baseline[s] = redistribution[s][s]. Given a set of closed sites C (possibly empty), compute and return a dictionary over the open sites O = AllSites − C with capacity[o] = baseline[o] + sum(redistribution[c][o] for c in C). Exclude closed sites from the output. For example, if C = {} return the baselines; if C = {'A'}, then capacity['B'] = baseline['B'] + redistribution['A']['B'] (e.g., 110 + 10 = 120).

Quick Answer: This question evaluates a candidate's ability to manipulate nested dictionary data structures and perform aggregate capacity computations, assessing data transformation, mapping, and set-based reasoning skills relevant to a Data Engineer within the Coding & Algorithms domain.

Related Interview Questions

  • Solve Two Backtracking Array Problems - Meta (hard)
  • Solve Array, Matrix, and Recommendation Problems - Meta (medium)
  • Find a String Containing Another - Meta (medium)
  • Solve Subarray Sum and Local Minimum - Meta (hard)
  • Validate abbreviations and brackets - Meta (medium)
Meta logo
Meta
Sep 6, 2025, 12:00 AM
Data Engineer
Technical Screen
Coding & Algorithms
5
0

You are given a nested dictionary redistribution where redistribution[closed_site][dest_site] equals the additional capacity required at dest_site if closed_site is shut down. The baseline capacity for each site s is baseline[s] = redistribution[s][s]. Given a set of closed sites C (possibly empty), compute and return a dictionary over the open sites O = AllSites − C with capacity[o] = baseline[o] + sum(redistribution[c][o] for c in C). Exclude closed sites from the output. For example, if C = {} return the baselines; if C = {'A'}, then capacity['B'] = baseline['B'] + redistribution['A']['B'] (e.g., 110 + 10 = 120).

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Meta•More Data Engineer•Meta Data Engineer•Meta Coding & Algorithms•Data Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.