Two coding questions:
- Count the minimum number of coin flipping to get a beautiful sequence.
- Give a binary array, count minimum number of moves to get ones at one end and zeros at another end.
example: [1,1,0,1,0,0] -> [1,1,1,0,0,0]
[0,1,0,0,1,1] -> [0,0,0,1,1,1]
Wish these would be helpful to you.