longest_subsequence()
return type of get_edit_distance() must be 'C'
first solution to longest_subsequence