Search
⌘K

Leetcode 2380. Time Needed to Rearrange a Binary String

Given a binary string where every second all occurrences of "01" simultaneously become "10", determine how many seconds until no "01" remains; the core challenge is modeling the parallel, cascading swaps to compute how far ones must move past zeros (can be solved in O(n)).

Asked at:

Salesforce


Question Timeline

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

Mid February, 2026

Salesforce

Senior

Mid February, 2026

Salesforce

Senior

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