Skip to main content
Longest Common Subsequence | AlgoCracked
AlgoCracked
ProblemsLongest Common Subsequence
Medium57.0% acceptance
Blind75Dynamic ProgrammingString

Longest Common Subsequence

Given two strings text1 and text2 , return the length of their longest common subsequence . A subsequence keeps characters in their original order but may drop any number of them; a common subsequence appears in both strings. Return 0 if there is none. Input format Input is [text1, text2] , e.g. [ abcde , ace ] .

Loading workspace…