var GeneralizedSuffixArray = require('mnemonist/suffix-array').GeneralizedSuffixArray;
let gsa = new GeneralizedSuffixArray(["abcde", "ace"]);
let actual = gsa.longestCommonSubsequence();
let expected = "ace";
console.assert(actual == expected);
longestCommonSubsequence gives back "a" in this instance.
This is a duplicate of #196. There is indeed a bug here but I need quite a lot of time to fix it and I don't really have any incentive in the short term to do so. I will of course review a PR on the matter though.
To reproduce:
longestCommonSubsequence gives back "a" in this instance.