Index

0

1

2

nextl

4

3

2

(a) Shift values from the left

Index

0

1

2

nextr

2

3

4

(b) Shift values from the right