UPDATE
I worked out an algorithm that I think runs in O(n*k) running time. Below is the pseudo-code:I worked out an algorithm that I think
I worked out an algorithm that I think runs in O(n*k) running time. Below is the pseudo-code:I worked out an algorithm that I think