โ† Cohesity questions
CodingReported in a candidate post, Jul 2025

Move All White Balls to the Start

Filed under Cohesity

The question

Given a string containing only 'B' and 'W' characters, move all white balls to the start of the string using only adjacent or element swaps in O(n) time and O(1) space without overwriting characters.

No write-up yet. Related questions below have one.

Related Cohesity questions

Collected from public candidate posts and coding forums. Updated Nov 2026.