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:
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.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.