[LeetCode] Time Needed to Rearrange a Binary String

1 · · Aug. 20, 2022, 4:12 p.m.
2380. Time Needed to Rearrange a Binary String You are given a binary string s. In one second, all occurrences of “01” are simultaneously replaced with “10”. This process repeats until no occurrences of “01” exist. Return the number of seconds needed to complete this process. ...