Write a method isBalanced that returns true if the passed String is balanced.
A String is balanced if in every substring, the absolute difference between the
number of 1s and 0s is at most 2. You need to assert that the passed value
is not null, but otherwise it will only contain 1s and 0s.
You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: