Before revision:  We develop a dynamic programming algorithm for this case that runs in O(n^2) time . Its practical efficiency is also confirmed in our experimental results .
After revision:  We develop a dynamic programming algorithm for this case that runs in O(n^2) time .