Minimize the Thickness Problem
Minimize the Thickness Problem — ExecCode Medium DSA Practice
Solve the Minimize the Thickness problem on ExecCode. Free online medium DSA practice in Two Pointers. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Split the array a into one or more contiguous segments that all have the same sum. The thickness of a split is the length of its longest segment. Return the smallest thickness you can achieve. Return the smallest thickness. You are given: a — a Return the smallest thickness. Copied from OA Lab Part 1.
Examples
Input {'a': [1, 2, 3, 3]}; Output 2. Input {'a': [1]}; Output 1. Input {'a': [1, 1, 1, 1]}; Output 1
Constraints
Follow the statement. Use a 64-bit integer when values can overflow.
Practice Minimize the Thickness free on ExecCode. Browse DSA problems, topic map, and placement guides.