Skip to main content

Posts

Showing posts with the label common

Common sequences in two strings [closed]

I am looking to find all common sequences of works between two strings. For example: String A: A, B, 1, 2, 3, 4, 5, X String B: 1, 2, 3, 4, A, B, C The common sequences here would be A, B & 1, 2, 3, 4 I am looking for a Java solution which will do this. Thank you very much