The longest common subsequence (LCS) problem and its variations have been studied deeply in past decades. In the constrained longest common subsequence (CLCS) problem, given three sequences A, B, and C of lengths m, n, and r, respectively, its goal is to find the LCS of A and B that C is a subsequence contained in the LCS answer. This thesis proposes an algorithm for obtaining the CLCS length based on the diagonal concept for finding the LCS length proposed by Nakatsu et al. Our algorithm can find the CLCS length more efficiently with O(rL(m − L)) time and O(mr) space, where L is the CLCS length. As the experimental results show, our CLCS algorithm outperforms the previously published algorithms.