Advertisement
CR7CR7

listOfSubsecuenses

Mar 16th, 2022
623
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { mapString, isSubsequence, longestWord } from 'subsequence.functions';
  2. import { dictionary, stringSequence } from 'subsequence.words';
  3. function longestMatch(string, dictionary, ___) {
  4.   let map = mapString(string, ___);
  5. };
  6. ___
  7. let listOfSubsequences = [
  8.   ___
  9. ];
  10. for (var element of dictionary) {
  11.   if (isSubsequence(element, map, ___)) {
  12.     listOfSubsequences.push(element);
  13.   }
  14.   return longestWord(listOfSubsequences, ___);
  15. }
  16. console.log(stringSequence);
  17. console.log(dictionary);
  18. console.log(longestMatch(stringSequence, dictionary));
  19.  
Advertisement
RAW Paste Data Copied
Advertisement