<s>
In	O
computer	O
algorithms	O
,	O
Block	B-Algorithm
swap	I-Algorithm
algorithms	I-Algorithm
swap	O
two	O
regions	O
of	O
elements	O
of	O
an	O
array	B-Data_Structure
.	O
</s>
<s>
It	O
is	O
simple	O
to	O
swap	O
two	O
non-overlapping	O
regions	O
of	O
an	O
array	B-Data_Structure
of	O
equal	O
size	O
.	O
</s>
<s>
However	O
,	O
it	O
is	O
not	O
simple	O
to	O
swap	O
two	O
non-overlapping	O
regions	O
of	O
an	O
array	B-Data_Structure
in-place	O
that	O
are	O
next	O
to	O
each	O
other	O
,	O
but	O
are	O
of	O
unequal	O
sizes	O
(	O
such	O
swapping	O
is	O
equivalent	O
to	O
Array	B-Data_Structure
Rotation	O
)	O
.	O
</s>
<s>
A	O
rotation	O
is	O
an	O
in-place	O
reversal	O
of	O
array	B-Data_Structure
elements	I-Data_Structure
.	O
</s>
<s>
This	O
method	O
swaps	O
two	O
elements	O
of	O
an	O
array	B-Data_Structure
from	O
outside	O
in	O
within	O
a	O
range	O
.	O
</s>
<s>
The	O
rotation	O
works	O
for	O
an	O
even	O
or	O
odd	O
number	O
of	O
array	B-Data_Structure
elements	I-Data_Structure
.	O
</s>
<s>
Gries-Mills	O
and	O
Reversal	O
algorithms	O
perform	O
better	O
than	O
Bentley	O
's	O
Juggling	O
,	O
because	O
of	O
their	O
cache-friendly	O
memory	O
access	O
pattern	O
behavior	O
.	O
</s>
<s>
The	O
Reversal	O
algorithm	O
parallelizes	B-Operating_System
well	O
,	O
because	O
rotations	O
can	O
be	O
split	O
into	O
sub-regions	O
,	O
which	O
can	O
be	O
rotated	O
independently	O
of	O
others	O
.	O
</s>
