https://videosashka.com/watch/-VVN0FI0KFo/separate-black-and-white-balls-leetcode-2938-python