List of usage examples for org.apache.commons.collections4 ListUtils longestCommonSubsequence
public static String longestCommonSubsequence(final CharSequence a, final CharSequence b)
From source file:com.flipkart.zjsonpatch.JsonDiff.java
private static List<JsonNode> getLCS(final JsonNode first, final JsonNode second) { Preconditions.checkArgument(first.isArray(), "LCS can only work on JSON arrays"); Preconditions.checkArgument(second.isArray(), "LCS can only work on JSON arrays"); return ListUtils.longestCommonSubsequence(Lists.newArrayList(first), Lists.newArrayList(second)); }