### A greedy approach for computing longest common subsequences

**Afroza Begum**

**Abstract:**This paper presents an algorithm for computing Longest Common Subsequences for two sequences. Given two strings \(X\) and \(Y\) of length \(m\) and \(n\), we present a greedy algorithm, which requires \(O(n log s)\) preprocessing time, where s is distinct symbols appearing in string \(Y\) and \(O(m)\) time to determines Longest Common Subsequences.