Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Special Binary String
Bookmark
Brute Force
Decomposition
Input
Standard
Reorder
Minimal
Custom
s
=
11011000
11011000
▸
101100
▸
10
string
1
0
"10" length ≤ 2 — return unchanged
11011000
▸
101100
▸
10
string
1
0
"10" length ≤ 2 — return unchanged
11011000
▸
101100
special parts
10
1100
concatenation
1
0
1
1
0
0
split into 2 special parts
11011000
▸
101100
permutation of parts
10
1100
concatenation
1
0
1
1
0
0
best ★
101100
trial 1 / 2 — new best ★
11011000
▸
101100
permutation of parts
1100
10
concatenation
1
1
0
0
1
0
best ★
110010
trial 2 / 2 — new best ★
11011000
▸
101100
best arrangement
1100
10
concatenation
1
1
0
0
1
0
best ★
110010
best of 2 arrangements
11011000
special parts
11100100
concatenation
1
1
1
0
0
1
0
0
best ★
110010
split into 1 special part
11011000
permutation of parts
11100100
concatenation
1
1
1
0
0
1
0
0
best ★
11100100
trial 1 / 1 — new best ★
11011000
best arrangement
11100100
concatenation
1
1
1
0
0
1
0
0
best ★
11100100
best of 1 arrangements
11011000
largest special string
1
1
1
0
0
1
0
0
algo
master
.
io
Step:
"10" has length ≤ 2 — return as-is.
0 / 8
Input
Standard
Reorder
Minimal
Custom
s
=
11011000
0 / 8
algo
master
.
io
Step:
"10" has length ≤ 2 — return as-is.