Katkat

Optimize machines for distributed merging cost

KneronSoftware Engineer · Online Assessment

Last updated

Optimize machines for distributed merging cost evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

In a distributed computation, processing the entire dataset on one machine takes O(n) time. If the data is evenly partitioned across k machines, the per‑machine compute time becomes O(n/k). Merging the partial results from the k machines takes O(k^ 2) time. Assuming negligible other overheads, which value of k approximately minimizes the total runtime O(n/k + k^ 2)? Pick ONE option: A) around 10 B) around log2 n C) around square root of n D) around n/2