← Questions

Longest all-equal array after merging neighbours into their sums

0
MicrosoftCodingLast asked Sep 2026

You may replace any run of adjacent elements with their sum. Make every element of the resulting array equal while keeping it as long as possible, and return that length. Only the title of this report was public; the details follow the plain reading of it.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding