(define (lcs lst1 lst2)
(define (except-last-pair list)
(if (pair? (cdr list))
(cons (car list) (except-last-pair (cdr list)))
'()))
(define (car-last-pair list)
(if (pair? (cdr list))
(car-last-pair (cdr list))
(car list)))
(if (or (null? lst1) (null? lst2)) null
(if (= (car-last-pair lst1) (car-last-pair lst2))
(append (lcs (except-last-pair lst1) (except-last-pair lst2)) (cons (car-last-pair lst1) '()))
(**if (> (length (lcs lst1 (except-last-pair lst2))) (length (lcs lst2 (except-last-pair lst1))))
(lcs lst1 (except-last-pair lst2))
(lcs lst2 (except-last-pair lst1))))))**
감사합니다, Superguay
당신은 그것이 무엇을하고 왜 그것이 현재 나쁘다고 생각하는지 설명 할 수있을 것입니다. – ponzao