Search
⌘K

Leetcode 2808. Minimum Seconds to Equalize a Circular Array

Given a circular array where each second every element can take its own or a neighbor's value (so values propagate outward one step per second), find the minimum seconds to make all elements equal. This reduces to, for each distinct value, computing the maximum circular distance any index is from the nearest occurrence of that value and taking the minimum of those maxima.

Asked at:

Amazon

Amazon


Question Timeline

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

Early January, 2025

Amazon

Amazon

Mid-level

Circular Servers Synchronization: Find the minimum time required to synchronize data between a subset of servers arranged in a circular fashion.

Comments

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