Dynamic Programming 8

0. Consider two strings A = "qpqrr" and B = "pqprqrp". Let x be the length of the longest common subsequence (not necessarily contiguous) between A and B and let y be the number of such longest common subsequences between A and B.
Then x +10y = _________.

  • Option : A
  • Explanation :

    Longest common subsequence : qpqr
    x + 10y = 4 + 10 × 3 = 34
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *