Prime Reversal
You are given two **binary** strings $A$ and $B$, each of length $N$. You can perform the following operation on string $A$ any number of times: - Select a [prime number](https://en.wikipedia.org/wiki/Prime_number) $X$. - Choose any substring of string $A$ having length $X$ and **reverse** the substring. Determine whether you can make the string $A$ equal to $B$ using any (possibly zero) number o
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