Skip to content
Related Articles
Open in App
Not now

Related Articles

UGC-NET | UGC-NET CS 2017 Nov – III | Question 34

Improve Article
Save Article
  • Last Updated : 01 Jun, 2021
Improve Article
Save Article

Consider the following two sequences :

X = < B, C, D, C, A, B, C >, and 
Y = < C, A, D, B, C, B > 

The length of longest common subsequence of X and Y is :

(A) 5
(B) 3
(C) 4
(D) 2

Answer: (C)

Explanation: Initially, We check for length 5 sub-sequence between both given sequences but couldn’t find.

Then checked for length 4 sub-sequences and CDBC and CDCB two sub-sequences found.

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!