Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Every <code>1</code> in the string <code>s</code> should be swapped with every <code>0</code> on its right side.
Iterate right to left and count the number of <code>0</code> that have already occurred, whenever you iterate on <code>1</code> add that counter to the answer.