You have n boxes. You are given a binary string boxes of length n, where boxes[i] is '0' if the i<sup>th</sup> box is empty, and '1' if it contains one ball. In one operation, you can move one ball from a box to an adjacent box. Box i is adjacent to ...

Markdown supported · ⌘↵ to post
No responses yet.