You are given a binary string s. In one second, every occurrence of "01" is simultaneously replaced with "10". This process repeats until no occurrences of "01" remain in s.
Return the number of seconds required to complete this process.
Constraints:
s.length
s[i] is either '0' or '1'.
You are given a binary string s. In one second, every occurrence of "01" is simultaneously replaced with "10". This process repeats until no occurrences of "01" remain in s.
Return the number of seconds required to complete this process.
Constraints:
s.length
s[i] is either '0' or '1'.