Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { mapString, isSubsequence, longestWord } from 'subsequence.functions';
- import { dictionary, stringSequence } from 'subsequence.words';
- function longestMatch(string, dictionary, ___) {
- let map = mapString(string, ___);
- };
- ___
- let listOfSubsequences = [
- ___
- ];
- for (var element of dictionary) {
- if (isSubsequence(element, map, ___)) {
- listOfSubsequences.push(element);
- }
- return longestWord(listOfSubsequences, ___);
- }
- console.log(stringSequence);
- console.log(dictionary);
- console.log(longestMatch(stringSequence, dictionary));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement