Minimum Frames for Equal Chunks
Updated
Problem statement
You are given an array dataframes of positive integers. Each value represents the size of one dataframe.
For every dataframe, its final size must be divisible into at least two chunks of equal positive size. You may add frames to a dataframe. Return the minimum total number of frames that must be added across all dataframes.
For example, values already divisible into two equal chunks need no extra frames, while 1 and 5 each need one added frame.
Function
minimumFramesForEqualChunks(dataframes: int[]) → intExamples
Example 1
dataframes = [1,6,8,2,5]return = 26, 8, and 2 can already be divided into two equal chunks. Add one frame to 1 and one frame to 5, so the answer is 2.
More The D.E. Shaw Group Online Assessment questions
- Count Lucky TicketsOA · Seen Nov 2026
- Count Palindrome Addition ChoicesOA · Seen Nov 2026
- Non-Alternating Binary PartitionsOA · Seen Jul 2026
- Tree PointsOA · Seen Jan 2025
- Get Minimum CostOA · Seen Jan 2025
- Subarray RemovalOA · Seen Oct 2024
- Count the Number of Incremovable Subarrays IIOA · Seen Sep 2024
- Subarray RemovalOA · Seen Aug 2024
- Get Minimum CostOA · Seen Jun 2024
- Find Number of Interesting PairsOA · Seen May 2024
Similar questions at other companies
- Picked Player Who LostSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
- Total Cost Against the Lowest Earlier PricePayPal · OAPayPal interview questions
- Count Valid Square PairsAuxoAI · OA
- Server InvestmentRippling · OARippling interview questions
- Basic Item DiscountsPalantir · OAPalantir interview questions
- Next Pascal Row CoefficientIntuit · OAIntuit interview questions
- Unique Integers That Sum to ZeroNVIDIA · OANVIDIA interview questions
- Count Multiples of Three with Two SevensHudson River Trading · OAHudson River Trading interview questions
- Diagonal Bounce TraversalAutodesk · OAAutodesk interview questions
- Maximum Student-Teacher DistanceChubb · OAChubb interview questions