Showing posts with label Longest Common Subsequence. Show all posts
Showing posts with label Longest Common Subsequence. Show all posts

Monday, January 5, 2015

Codeforces 463D - Gargari and Permutations

Problem Statement:
463D - Gargari and Permutations

Solution:
An interesting extension to the idea of longest common subsequence. By simply extending the classical \(O(n^2)\) longest common subsequence algorithm to \(k\) strings, we have an \(O(kn^2)\) run time complexity.