2938. Separate Black and White Balls - Explanation

Problem Link