Question 1
Given below is the algorithm to print the longest common subsequence between the -prefix of and the -prefix of . The matrix stores the directions along which the algorithm should perform the backtracking operation in the form of arrows. Fill the given blanks to complete the algorithm.
OUTPUTLCS(Backtrack, v, i, j) if i = 0 or j = 0 return if Backtrack_{i,j} = ↓ OUTPUTLCS([ I ]) else if Backtrack_{i,j} = → OUTPUTLCS([ II ]) else OUTPUTLCS([ III ]) output v_i