Search
⌘K

Leetcode 1983. Widest Pair of Indices With Equal Range Sum

Given an integer array, find two (contiguous) ranges with equal sum such that the distance between their starting indices is maximized, and return that maximum width; this typically reduces to using prefix sums and a hash map to track earliest/latest occurrences of each cumulative sum.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.