Driver code
let X = " " . split ( " " ) ; let Y = " " . split ( " " ) ; let Z = " " . split ( " " ) ; let m = X . length ; let n = Y . length ; let o = Z . length ; document . write ( " " + lcs ( X , Y , Z , m , n , o ) ) ;