Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



Consider two sequences $X$ and $Y$:

$X=\langle 0,1,2,1,3,0,1\rangle$

$Y=\langle 1,3,2,0,1,0\rangle$

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






Solution

Given sequences are

$X=\langle 0,1,2,1,3,0,1\rangle$

$Y=\langle 1,3,2,0,1,0\rangle$

One longest common subsequence is

$\langle 1,2,1,0\rangle$

This subsequence has length

$4$

Therefore, the length of the longest common subsequence is

$4$



Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...