Binary String Randomizer
Chef JJ is a fan of random events and calculating probabilities. He designed a machine called the binary string randomizer (BSRand). BSRand takes a binary string $A$ (say, of length $N$) as input and then generates a binary string $B$ (of the same length $N$) as output using the following algorithm: For each $i$ from $1$ to $N$, - Uniformly randomly choose an integer $j$ between $1$ and $N$. - U
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start