The Optimal Replacement
Algorithm
Reference String:
1
1
1
1
1
1
1
6
6
5
5
5
2
2
2
2
2
2
2
2
2
2
2
3
5
5
4
4
4
4
4
4
4