This is a verified interview question from De-shaw. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Minimum Frames to Add for Equal Sized Chunks - De Shaw" covers key patterns like Other.
"You are given an integer array `dataframes` of size `n` where each element represents the number of frames in a dataframe. A dataframe is considered valid if it can be divided into at least two chunks of equal size. In other words, if a dataframe contains `x` frames, there must exist an integer `k >= 2` such that: * `x` is divisible by `k`, and * each chunk has the same number of frames. If a dataframe cannot be divided this way, you may add the minimum number of frames required to make it divisible into at least two equal-sized chunks. Your task is to determine the total number of frames that must be added across all dataframes."
Join thousands of developers practicing for De-shaw.