Akuna CapitalCodingMembers
Segregate Binary String (Move Ones to End)
Members only
Akuna intern OA string problem: separate the 0s and 1s in a binary string by sliding 1s rightward, and report the total cost of the moves. The clean solution is a single linear pass that avoids simulating each move. A nearby sitting asks for the number of bulk operations instead of the displacement cost, so confirm which the prompt wants.
SWE
RS
greedy
prefix-sum
binary-string
string
medium
Frequency
Low
Last asked
2025-08-26
Stage
oa
Log in to continue reading the full content
Comments
Sign in to join the discussion
Loading...
