【算法】Inclusion of a Shuffled String Into another String

Inclusion of a Shuffled String into Another String

sliding window

Instructions

The function is given two strings s1 and s2. Determine if one of the permutations of characters of s1 is a substring of s2, return true / false.

Examples
checkInclusion("ab", "edabitbooo") // true
// "ab" is in s2.

checkInclusion("ab", "edaoboat") // false
// neither "ab" or "ba" is in s2.

checkInclusion("adc", "dcda") // true
// "cda" is a permutation of "adc" and it is in s2.

checkInclusion("sgyuws", "oldqwqdmlvsguswyfbj") // true
// "sguswy" is a permutation of s1 and it is in s2.
Notes
  • All characters in both strings are lowercase letters.
Solutions
const checkInclusion = (s1, s2)=>{
    let [l1,l2] = [s1.length,s2.length]
    if(l1 > l2){
        return false;
    }
    let [left,right] = [0,-1];
    let count1 = Array(26).fill(0)
    for(let s of s1.split('')){
        count1[s.charCodeAt(0) - 'a'.charCodeAt(0)] ++;
    }
    let count2 = Array(26).fill(0)
    while(left <= l2 - l1){
        if(right + 1 - left < l1){
            count2[s2[++right].charCodeAt(0) - 'a'.charCodeAt(0)] ++;
        }else{
            let is = true;
            for(let i=0;i<26;i++){
                if(count1[i] !== count2[i]){
                    is = false;break;
                }
            }
            if(is){
                return true
            }
            count2[s2[left++].charCodeAt(0) - 'a'.charCodeAt(0)] --;
        }
    }
    return false;
}
TestCases

let Test = (function(){
    return {
        assertEquals:function(actual,expected){
            if(actual !== expected){
                let errorMsg = `actual is ${actual},${expected} is expected`;
                throw new Error(errorMsg);
            }
        }
    }
})();

let [actualParam, expectedParam] = [
    [
        ["ab", "uxabbcdooo"],
        ["ab", "edaoboat"],
        ["adc", "dcda"],
        ["sgyuws", "oldqwqdmlvsguswyfbj"],
        ["uauqkavvk", "stbwkbgrgkkazdqdwivguyr"],
        ["jsrsvticzizxdgttvevtdjv", "evdfabkqornrvfodhncarywkdpkpcbqiehbsanbticvvdrsxtejzjvttiztvsdg"],
        ["vxawvaaxxmvwmusvactvua", "dfnyutauktxttggircfonqxkntdarbcfqjfopiqmumkkpcwqclamojxfwuamslttxaqnuzptvaazguwzazopxspmiaemysrncosh"],
        ["ftoraoaazamnoarovhkcvkczmrohaumffcqz", "snclfgtmqfsphufzrovsxobssmftqycxutinbfazvgvmafxlegduffbtcpygelegcwgfslmmyiacejgbhoyjnhdcxppywusjbpcvvvmaaahmonoocuofqazramzkrrkcoazcfhtftfmyx"],
        ["zstwsnvvifghh", "chdtpmrqkdpywxovzshwankvebmqedsysxkmfuafxllvktzodrfrfwibbbsqaszotvvcoycxjghmqkihutrfyfcixlphikkvnqjyywvtlcugkcdwyksvlzumjkdzhjvyagnmajwdfhegvcnaypnaeeflrfzmitdistyrvmxagktuemzzjhym"],
        ["rtwufneitnsuowucpcoiuzgnwpagruzkugxnnogecvesbppamryvbvgncrggugerinzmmeeemzrp", "fugzgcmlwxbrunjzabeanghesyvrotgzeqmeibxerewvnisckwwyahjbopbapduaxjvaohszzmcnwsharwuknwceqmyotpdaidikucpqenvrrpaboicjzjclwbtltightgykvcjcrziamrlqtdvvpfaaalcdgyrshqdaicwzlxdeqbxvrbrghawapevqdbocfhcrsoujyeafyarwtizmsadqrczckndmiknlmbagkcnggbqqlzrneacrtjeuieguzusrebpugtubiinefgurevgwnxnoeoovrrpcgrczmsamgpacknpwecmwynvzugtrpnmzng"],
        ["hdvphgensnvognqnzcdqiefconziskijqweeppgwogmzshnjdjlqpljljtuoeishidsnpgietd", "xwvjqhgswrypssjiixvworjdcaxkhootnniziuujnmpndvygkkhrpjzdmdgfjhyzxivoqxbxdouaspbivfohijawhrgpnljitpryqjhiuhirikrwlcsakffqmpczrffsnoogsuishwgkypixflecsexmqxqaeizwicdhxdifaeapjrhqtijbtagswkjtfgouueqkegqzqjwgxlnvagfolrukzspurlxsllcddosllwmbbekjnexqvtwqlelvgejvljdjpzrggzywxhdrbagibhxbzinyzwnuuhdndhnbjpumbxvomupemqxjcbbbzznmdgxrmvnmnvlautbtdityauwprnuouplbbhmttgmxarykfsnpobgemlzdpazmhadlulfaktvibaahwvzlvixiteclnbkvbnjajjrdvtjgztmcjknaphdswxpzibjgmqtqthaxodrsjaacypnomqshkbdtervkfafeudrhrwcltdkrtpphtzfc"],
        ["rlilbomorwrjgqlgrydhdiunnobdgeyrhnoblmqihuhgeeudjmruwfzgfeernmmrzzrprwbnydmdbrnydibdxnxbhxnypap", "aaeozyvningxhhwaoirbfhiczunqhrrzgfdwmyhuqvqyaewodegrftjdcjsnmlaykfzcsrxzusucksdmfjusoovokssppsqnzzdewobxortxthgabrxopplqfpymduvrskgcpcrocugfnpnxecvhzpywfnieesuryumwmruufqqvwipuopbdnoghdcbniissecjbkmiecyyciywprxyyazeuknjrphnpuiivtctboafqwvfwtsmtmthununfvhpnhvnigarayggwysgnwinercbsymajzexopvxeqrqkabguhykzmypsmtmtsshubykkdnztfafdrukinterszldqdclxembeqcgcqzgsfuzehpvyitprysxybhulbwzpeuhwyrhwjhvaxcsbcrkrebdzjbelaadzyaoxkadzbnqpfdvjjwjekgagnnhlwavorurqsdwmcqnqbygtqpyxeryhlzkemlfxznjzkbkrefdaxkjmxqdccnrzdwhinnblbnllsblcoynpembwupxiiruglqxveexgvluszwexaxbepfuglopwvjdnfolvfwrelrumlkgftlwiarsjzalowrzgemrteulxanlihvybvbyszswqholqqqlfozxoqxdzowljiwixgofnsqetvvdenjenqugvebwnhomqjkdzarqlrqozifinltvrmrretfblavstdzugmuvbxppdlofsqxqzbumgcliwjvhfodnfduqofvnvvayxwgiqsbmeygleasmgswehekavanwqloqmdlplowtvdutmsroubdzkqsrfpjtfglnucasqmmadmjdeiiydeufomslflihtdybubynezdmyeywualbdzshbwctccayaxrmfahtlyidjgptinzzmbpfsxbuxrvmapxucbzslqsrjtrmeepiirxtwtmvmfjebrwafuuopzirsksqrijsfyogmqwredovlfwlyrejrisrpfgtvgyekcyksdreerjdlurbrgmndhxnilzifbdoadxdrgmobwnnrrymwmolhjbngrhbnxdyodnmieepguberypwzzrqqrudpbyurleghhinymfc"],
        ["jiiscqsppxbyhrxglggbcravrrarlmktrctbmshr", "ezvfpopgfdhiwhgwhefequhodrlfjbteelbakspsbvhittrxrvajvdrbixadlvbgizpzbibfeavhyqqddmzxhmtpetwoshvdrgmlexhvvrkugvvvmypjmrujgkzampvqufiicqlypsdkamymplvenacqwpezfcwiocvuprfvyhnqwyywiqhdktfldnakmkggbgceyaxdcmxzrtcicukxqwzkztivppqkudpqmfxhtcuewsvsfyikghafntgmpyoexhjdcmbxksrnbcairljswjmrhqbleffdpgpivnrewmmoxcepyasmxrnpvqojevhbmxcwhbawpwacgsaamerwhfogwqyekzvjhvfehonijenydqietylyzrtnqepqodzxbogzzszqcblvvvarqopphsxnvcoukpxnzicubeqrtblehjnrburlxajxjjsgygihuxjozccejlofevqywqjgxkytmpakgrhijtenflvgnscbiwyxuendrhmdgscbkchdjckspfynihrsvruiyodoinixrsklcyhbckjjbxylqzvhlmkpoyuawhzuechvnquzkamouydszofnbpsttybzdxoynjcgdiynlhlcizriokxktrrxabypvarsrwxpwlcuqtlkmersgkyframrpiqvhlqrrdphjdkwgplycnuhpeogiepzeeyougolrqjsdhruqyxhvffgjozyjtqutukfsqwofewdiijrcjhxushclqmnxowpldydvtelkixzavlpcbgojkfohraiitnwwchtptqvqzehfgvbcmnoranjemwfwjqhotvaajvzcdblujqatcpoffcrilwmbhshdpgemcdjkurrjlbncivjxfufnencjmxxmzikaspjsahhccaesavesyannkklosgmzuupcoetrzdtwesetviiyvmusfsruqfhnabewnrnlbblumkfzuxdsmuztwwyrbyjtsvzxkuyhzsuwfebojpwlospsecxafryutfkdbrhcdzvmmpraojghfljbpkhwqelefhnexxmkddpaxdzpsznihxovozqutwoenfoafszlfmjjcqykoaiigawashcuueupvrlugrolrfkosvetzazjlbjfacweuldtnakdseoqmtgthbpuluyuaweanqjmsnzeqehiwjgopijcnsirfwmoowkgatgzwtlratopiqyajbofegdwoilevoytnjnvsxpoazudnodeogyoyfakqtjrfpgcinvcxohuoavbkqiehnyppqdgsadutqddfkbryefpelwwogogxjqhpdwlkbvwkndtquooawkciaxlnbrlssbhhjflsmjtfnckrueyjvmvwpkyabwlmjditzzxjqtbwclbuthwnncplvqnrnoqqmfpvotagnhmzqukyrguricipxankjrkqvymmjtygpxafkzwqrbaigxcmyegjtsfynhgtpwhfryhehdxwjhguybkopgbkggrgkwp"],
        ["rlwhtlxxuzktxnsudoyfwaxeduzgdvmmwuqbkqwowtpbcuwuukvddkzdshojuoykhpomtihbxoyxmphvfbbiculojdqtwxerevxylcidwtwvoyjdxeetxcszzsnohyzlypepaubqvfziebbo", "tbotfqsqkhbvecgasaibpkalymvntwerwqpqypxqublxrxrclrgweqhiqsvtwuldztohdacudayauziznssrmhdwyaplehmqhdplbzxtcoelekjtiresopvryupblkqucxkgzwqlxyvsaeoobqwjlxbwgazpntfatznnnfchgfpaoceiimhqyupdwlzgmhqlpbwejluqemydarebpqlymtyfauspraqhvfzmeshiwtzreerkcvqqbdwusfmudlzvdzfbemowajosufdfgtasaipcfcjngcobrgnxvcnjqgqacycjlfrwnvjxppuumxwzlvedgcbkoszmfnnrqsvttytzekpotfvxvoberorbupcxdwkjyuxfiqwvncokjasewdwrxtpmiyxvijnlflivmchdoidxfosymbtetuyhmvlchhkikhxcfbwllwvhbltkknyaxdosdcjiynnipxghgodzkeuoaxdypnasgjxfxjptyoeewronygblrlekejwyorrwpspvdhxslhhmyctaratcpkccazcquhmutjqxwhtqmlvnzhdtpexwinfcrolwmbabbzntqsibxqgobmkrfdckhnlbcfxrxuretthufpvjchfoqgfuchcoeojxruynfuwsqbxhxbflbmildtaxruizonafdahtmpjaasndzjvkaxphbablxszmphxssueaghsbednwygfijenhwobumpxvjrykocpccsstevtsphzuridpfyouqktnweystkllrfvgibrdvnuaegjehmvpejxyynvvnchaeivqhztdfynwxstmaqlrabwmpbtoasrusufnoyalyxatixszbnkqtyfdwumvoqcgzoyynpaamhawidezxdflyfusmsmxuxmkzzncxewjpphsxjewmhoqdxduobrisjhyrgcdpdkznekcxpfpjnbtxmbzjucdqszvqroafipomdelfhspomrllocengviscgmtcyqigaxeoxavnopemypjqppxcmawxpoxxifjrdiwlxxvcpoeuwdylpinbmbbyytacviirujccibqnixivliglcbikxrbblvtekpuakotzcuiojpjponjyknmhtebsggxxjzlgbauouxlqeukaueoijqgyvgckqcxztcrpsitfkpfnuqtntfxylrddpfnikrcmafxzuwfkyliwkfkhrfvcubkrlrgzobiavivetnxlyxkvpjlhtvhkrgxfooitwabmriblsdfehyvjptmxhrkgykjjqjhvyzwyzmpdhibtrqlnzjfistmvhqrmgwdaybnaidnpwsevioruknsjatrhyfjjjsflfzdogpzysnxzwmlzbwrbjouoblolxdidgrnwyaepkuyufabhouknccysklmrkczuswctcfyinxeituqlpgksdmpyttvxnkjietsyqoiiyxhzhjlqruzemypxyugirahzgvjiufeuzobczuknexclqlqbvderqxmdwxnkqxpjklbfiteetllggbicqdbscgqxixkttgrogltdlclduskmfljadhlcdencmoejyaumeoklvcriitkgblwmitjdnbgjmhiusrxwlksnpmgyeijvmyouiejwtgrsihuundyolqbrwhkhphvelwdkjzfprgogpaosnhpibdbqryjtebcnnhizfidlkeautegtefycnvsvpjipurksejomjynqymfmpyvgydepumpvtymqjhqdjqvgrbwqrcbkmmtwtxmevdupdmxydysiwchikorxhzrzqlyqekbfgrxthkixrqidxdfusyqsagapkkprrdruomlqjfjykcxfmjzfnurvhxriprevdkoaogddtzoopkbrmabcgufywxsodvyxmgkrqysjpoyewhoydhbilsuctvgcgcfgykzwbebbrswcwusgxzpajifiwkxwcvgvwcbeuumfxavgtljnhgkshefdwqdfmshscjltckbwwgrpqjfibkemtchckmejexcpjpimhgybhjopafbqrkbwctjoiugpmaqbwyyuhpzueiumkdlhpocbxmfaawzwevdmvjqiyoarxjbtmoltwdeyzaofnjcakrnrszoiriqhljoxoycjnltmqpdklnhaitiuzsvkfjzevsfytaznxhifctrvvapyqluzcyxtxyskfnokccuurficpjgrnsvljwjcwxdxqphnbhyatwccwzvtomucgplfxhileibbwbuidbngdochkydnmkqcwsdbbyinhvfvbvlzpvsakqbptibbainzrjnntenlpgcrgrtvpptopazfeqffamvgkqazidxizwbvrajzyadzqnkuughddwbutgivviwyfqveacwqpwlzwtdoxpftrwvjlvkghdpqxnvmzjchtqymnswdrmopdnnsgqhexcimjfiozdarpezzdnqocdfsqqbtputxbshraiyleyjxiksbwaiklwjirfagpqwplpxbtwwvwwswyomtmbsmgbfqcjpkgmyotbcmbgkhyjvjzuvqqvmjjigojauvvdqxmvkfemaisriyxuzhrpagmhqqikprqouqvrsmnvwrixpczrlxqbjaplosnwwcuxdqlmimknalpimcdiypmyzallzraoquohgfinusqpinpxlaugzudlfselipnaacjueahwsyhwaizevhbzzdacxacvkpzsnfstjpfgdmixwtvzdrumnqxfrykkzmmdffkijkfincqhazapzwbkqbzagurvephgzqrfiklbivnvckduipfbxveceendedylzxzlacpxjkgeyfyyyoezrimmfwtawvtfqunxhribvqsdeioexmddskbocuoyfixtjgiwhncjepfmrzzjnmujxqvmawzgxiwrcodotyflqjngpnnxwamoysnlwvjkoziqtvlsexxnvbslntoztrrsndrsoygnsxfxfsaueeiuyyihhpkxqaippvdtjfxtrlbndeiedbmxkoqdtufuojyowfnvhpsxpbmszyduyllryxfckzwhmsqlxthlktccexyvbwjxdxtowkoauwooxepnxqzquodzvbuzlwwduagvcpmbuztzhvxudheyiiohbskvuttieejwoyrbwbdp"],
        ["zuxvzlbqqnxtybmvzvlyddpbjzcybqbjcvayzzybiaulgxljgdowrzqonzcwnnndedxwcmuynfpzdbvzmncsqvavvbdh", "azmcibomfyttfjistwgipmwywejctzayolydjzjpvatcrqnftfljfrdmrsnfehqveksnbdvhvuwkrjhymrxppknuwtxvyvaycfbqhmmwhrhbozodjxbmlwhcjomlvbfttwkmivjhzytsqjaqndwzjibdqsocltgclrefpyyvrpazlyptchkeahzfoicpoxdzxkfflvulrgstevcgijxgybgrllmzsckhrzktqxpsrxfugvkcctflfdvvappnxzgbgmexvjjkqsxgeyzexqajjbcjfxyhquaedzunkwakxfunqsyixgfecsexrtrqfgtswylwrdgcgeonlmbdscmseomtzzkhxxnuoblbkrujugtoibernphnodifggdjnerdcmwevjompjchwtlsrhazaktrpfhtmbineroncfijgfzswtaxyilyfnpapopzbioznnypmqpezqplitbhjoopecdugtcwymeeuraimdhojcseemtdxgdmtodawkoroiomkdszncwwipkowanmmdphwwggtkouckupeaqfyuhcumxtvpgyagcjbpfrrgvjlnrmfknuzuzrjratxweklnsckknloujdcmrzxgnkwtcpgfkjjtkawsbccjueptdhszzqvukisfghxirkzvgoudolvbvdhitvlbrrgomyhcqpgjlgmcjvomqwscuwwjvwbvmmwyifvdccvqachfjteoltsoeogcxdkaoncydvcoijsxqkhbegyhaxthsfycszgwtwfwjbufronmniexhntjxvgthvppmtszyfhzvrzoivhxgcqhtxqnffelieiowtfbxhbhzvqzgymnphtxisjjanmtzkphytbangjwanuefisftmahurfwlziruzvhogddcgiclrkvlzvfimtrlphpemdvqgojactgjskachgjximgmtbgnwccuymqydgocoqajcegratvyumrebkumfsvvpenjqzrburwhmulznwdytzkihiuwhmwxvlophudztkzpyqtcismwnyjvawfkgrmbjimsqimqubtegxueevwutaghvzybfnmueljxfswkfjrkfitrczjytjhwcpcvubbgmpktyzflcksijsbtjrzdryiajodnbgtiojakrlwibtbsozipjviqbmveeyuzxlbbstxfezsnqwjrwyoucqhxowqueuyvztuwarkhnyotpsrrvexxmebkmsnypxqaouhjlggsvrsxfbyfhtbkkxmlewfwwaxjcfaphdkntvljcttpdegilfxhwrsoedzbfnchzelneemnjgtfhyxhynwxejxfdcuboovunbwpepytffhijdlytbtrtqshrzlsdapmzxljyshtnfxpiqvfzlxjwfpyimzpbuvhfnotjuuuwaglcvxeywjelawwmdisfaephvylyufzvgnvapqkrchylguedwelrmklryjxmmijokofyhazlafnbjojbnwdgubwumoaoumlpfsnqhhmaklizbvcaruozcfclmzfixnjkfyjuoscuvwtjcizkgdooxauhjjvkexytdwxgbxvptqgzrlryaqeehslcdfkhxsfpvidvzwirebuajmvoxspkbwkcoovuyxrntymgmpwoozddrjqlhvwaeigmbcdbzrxjtcfcwgqwjdprynqmonshgtuodhakwtbllqbhzutjsqakeqdfcpzjvbicfsizxrkvzroaebmrqlhwedufsnpzfswlgqwcpdfvacekybbtpeongdahctdwsmblhoqowhqocvglyujzxfurzfwcegfvrdwagaqetiizjjoqvlaqcgpeskzeuhpiqidaflwbkcrczjszrsioonphwuidyhjfmdwmssuytvcouxldrfgbayivmptouycdiueaimwgafmyntdnmxbrgdalxbijcpstszdaofaisraeosekoghtdiudfjhqchnywjewyqfsqxyqsbvxzqizyszpvfjgaovfszptfbyoylpdptcczuhsvuqkxsiemvsrqhpbglndmtpoecmnlczrorcksripcswikwuowuqrywuuoctvhnjwweavqrigwcmiddjccmqzwdptidvstozzrecyzstjgteexqssyxciukgoasunpjdfqxifjkggwleqlivgvveclazjyeuhchgunlnvtkyvzczdvketlxebkqenvlplrrecbntxdbwdydqcofjbalfeodzfoyfkjfteqxfgjmiehxmtclfyeuuvxraquzbnmwmojdthhcabjckpeydejezekgiaqjtchebpggrbjufwekmujdkrxctgdqxtdijlmaadngbsqdpyanpgopazsecgudkpptrfdtubxjkhaiwexbdktuwmwfmyuccvgkkkhzsupofmktccynjdjbamrlysbxowkgicbmfikuekrkoglmvfwsctmibdikdzbtgmfowcjxcynzgdstziufkwroccaaczfekkinipppkoobkirnrgdwodtanqnrucmfbhhpjnuggaemyckkdlahtqifzjqtdgpfjokvnqcflpxquloooztelwhfwqympedxgubmiqgplygyufwdwwybxboqwxbiizgvdxhiigeemrjywaqubwvlxelwisvsrsrqgrimkfedsllsxhtbibeikypwxswxnbjhxjbuqbqtybnunaiwwfptsavfdxczfkitqncmvyxxzctnekfmsvpjlozgicsahdnfljayijybmzpadeozoqsacecmrmhidmsnerkqhoenehntfvhekozxqryikydpzxtosjdvmvfsvepnlbmisqlszpbojxxftwxgqumqfuztqboofmdnmyaczwjnndgfvlpaywvaxaqqwiclhzmgigozttswqpymipuiaewpalpnfoftzncmhqgvczeqecoyfzastcwdodcqtjflfrvrkysrvhaunyjlgszehjiwmuannnprrdcfxhyrfqahoirxiowpkdilevbsyyethzpdexllymfjatufwfadhgovmnbtvrdwlqdtowjuvdsnbwoiswykczjfzcgyzukhnnnjpskhwfnbkyzwbgzdgjouipvelixhrbzmforqoibiyqhygaoaalsfhvifzxovakcwxywiwvcgvujrmpmkdldzfoevedioqdwealrsksgohykbtykxwbhydvddxyqhvsixxxriaooolmwqnwdofiqueyrdnfsgmiwtfrewoarxqsqttdmbqlsebbzcuckcavbyuebdxpwbwhgdkvnoxbwhiolkbizhsbefbahydhzzrzbwvivxhuamtfhmfwxwdfltokwtbzeofoowehsepwfqiyjbywluftemjbcqifjbyluoypkmopkylhtvebqsmqbklwzyldxwuylzyfwfdrqfjyfxregokpjuicdgcuevvllgbkjflosibxslidudgtwrzznsqyxsovxebdafxpjrlmvhbbybocfvsbzwhfrujsjuopfmwbykqdxpowfqsekbpaojksaietlnqebxxlmkcmxtrilzwdadbxstjyvbfaufysfhvcgwxxdhqqautjyrofvytlqjlifaedityquerbhkyikmxeqegvmhtudizonynjkwwgalscrwwjmlimsgumdxvqgkkmfyargnnvcqwrdvefuozazoimpofxijnwxeckmtlgsdccadbqokhqhokziauyaznafewprtaebwvdajjuhoietvecswmyofxcskxpiqrdtejsvjkmeowiwqrtascobjkxmhdcqgqpqrfgxvnuexvscdhvornqvlxtggtjmljxznpgmjaxjnxiikefgarvbuhkrhaeiwbvvcxmgktmdqpmsgzarhqbedytljvldetzkytkogdnfxkbdapfzgsnmopvsepgnxbjbvgibnosvtkprdkuhzurbfaryinwtqszjrotxjwobfyinooqmprznneyntqpibavlpshylxjfuhstydepjhgdrlekogaianycixhmvwdfpsypeozbuxudpibbgtmmdotimeytnqmzpelcqnpexdmywegflgutyujgrvnszfprpjxxhnyedafqqfrkyftiqwkodqwnfpgtzrkebncohthifsajpxthrcbqbvbiqarnujvbjdztwrszvdojzqrxwkdjxxjzvbsnchgdwabigmepxzelgqujktgpykwyfkyemtnlfrvkxjedipdvjnzdtgkylzwqpaskejhxtyrktjwwmeuenqmhxjagkxbrmpwqsjndgobjsafzxwrydiajabfowrcdgybmvuosysfrilympbqrgwgdzwjfxwdqdbpdkbzxqikdbztgbrmphaeujmjrbfvwxaxabllntmdgqidjnqfqyojpxcxtmcfljwobzsgfsrrzfeqrzlzppjvyhrarqgmrwqqvtkqxxucfrpyeledveeaepppjrrxtqusbznrhapmhdtuweifofghketszmlxnzilxjhpqawjnnjlsvajqqtmaowhffigruyyhlnfbefcizoxigjqpmbejinbqcasbieaeofxfhmlyhatqvkuodmhclmrqqnpkygporutazsyupgocbzmwmwtyqicltpuysvwortlrncubkzolxigenatctuagrvroipnhecgrtdirhmtflkrskbqyrevrmdcxdpxlpzjxclunqeuedfbdbfrgjcnsyjsfllcpucazdogijiizfcaqwzkobugilijlmknbjrznioxxjupdrqrwbgfxhjlufsfefirnwuwjwtvrcfwtyphkkiigpgdcyddmvkyuwdylipxukgzytmppoqvdjaunaqeijtjjwdsioeeegybjmsjhkwvrymsretdakttbahyxiqpamshqqjzygkmdzgselvqmdxvuzurasvbnghyyjyvdbhisnbgqdwwjlslysqmnrdkhaqvboxsjghhzjvkpelvozuf"],
        ["quwvyxvqpmvhyxevmpvckyqmpgibegvyulrkaauyppbqmrnbgqpaxwpbfrqveyfpnrmckppzoqdmnpyfgkwqoxrmgusvhpmbvrooicbigvvrzqlakpyqguvimmmylgtpbsnnbzwymphomgporqvqkuyylpbbkqo", "vdhjhtdlkozdmhfdzdbdfkwzfrqyqhbacvdkcutwamexulmvcwdqisomhzfkqnhclqwzeovaoqttlzhmbpqljndslclnsxzoscmrnruuhrzcbecgmggfctuadbqamufsarfwhzhwcclhtndglwbldcnaoklvqapxndinmtvkjkwrkehjitwbbkxpsgqcmsryfvvbocapzbvqehrcquskzwlhfysehtvpuxrzhmvrszjaoitezhmpxwsivagtnfqimvhakagawefrcqyzxlsdsjvflaarjaxbmafrndaogrbknpdkltwsgwcpccwivhjwoocmodsehfwrkyovhwsvvkzaptshesmessfcdopshcbynjcdzkfenokrxoovrdlnazizhakrusgqnwfbvxbrveibeysdudvrzfxhfrehxuxrydlcbyoqtxbwkixognmeijazbnoyimewylqssnvrlqjobeuwnvtuvxnfqkqpfpxjzfvggrbbgibnfbgqcgdxitanuqcjlcbikeesnvjrhytxefmeverdkiufbkhtqhgzdgbtgbetywxtaetashbfrmzoljnqtbtgqsfsialcuoanjjfmotarilfayyyvdmwazahqdbuemfurwjanjylnvjnxikblyykgfyhctweqwlfclfnytxoslscqpxfopnmrtywtdchjdocbukbvozfypwyxiqdezjshkzruphojphacgasmxeftepbqhqhqsvhfrzuxxootyqjhiydxiuihtvdqkxkpfszfbdckiqgjwdxxefkzguyfcnvqaszefslgdozdudshxtkbzevlegkhakrjfzvdcurdtzjljfvwbzjpcpebmacygzxmqlzkgurfuzjvutlkmchgmktuycdrdfxnrkgxkvgilohlotbbrpmklxpomnbxewqomqkdvqyjuftdlooqpldgnwupzlueoydoiurlzxidhqsdkhhjmkbmvlquyzslrnffkxlciqvudiwvjlpmckfalqtajvdoxqkwwuggtynmxzrhpwokpqbxeebcovdqcgyhdueyiymqqcxldeicxcfhchufdukxcmthnxzrrtluyazwdklqgieelxrxduljeimtrhwnrtfvdfkndhgkweagrxdepabtxuuuvhmmujjqowgushznziumioaugfrxnwtkvxxrbzhkbijzkbmavwzwytihhrhdpbfafpoctadwoyhqecezpvnghxpsdcjfaatmkekbylrwsxifyemxexjhwyxfivfpyoqrqfqeohucwvsttbrverujuzikzbkpgtyltepqnqxgauqxnadghdbuolmiyvblapkonafcomzpdzbiyefbsxlmzholtcqpgllobqsyxjedtibiysyerkyqliohwqykudlvtzgffsuzoaiescrvntnqrcghnjznbtgixdogzwtkkeyiwayaslgsttsrwfuxywvqosnezbehzzuuobqpkfdwaifqqggryhwvjhppdlwdxijvgyjkjlcxveibvrlvrgfynrcjzjmgsvqtxnjnpnljukbfszuqqesgsjbefzyyhmmomwgokrchiajagxjjlujnzoitubjmajyauelncuqbpzifqanhrxbcwcdrpmyhfaizextwecejsibwraoznqtdrvmvjxftvremwobsvwgmrhdtvqjtzrelgiffpwkogjbtzooybbjfpkxlkdtypnlxalxfsiqickgpqbqlukpnmzopnywykujshbeoufjkwmymfqshobzbvnmxituzsflukpkcgrjelzmloxoibtfmnjbjlyvmcmcgpwvhcnybsppmornydytbhxbqaafpdhhhgvkkafcngltmgdxywymtthduspdsoiwgrebikvmtyhfgvyrynfzcvyoihskwbvdqmtsknqnezpocyhmzhexumarqhvhzytedtnfclhuopndlwyzehdhhlzjaueuwrjrbavjuhpsaiwzdtjlbqhhxbtvdjbwydimjsgpvifxtyejargvatmnzmwnbulrygnkrrvskulgiephozuotusphmcbqhgyowubjpiqdnohsnhweuavuhwzpesovnkpstbwpldvliyxqtaqbzxzjagymddsqujxovrzzdtibmsitqoprzmugnnplkdhvlojirkzlmhhzrpzhjmdpcqpqdwnwuotksagrdbzxgjlysdirjlnwmpucjczarjgndhwjgmmnpyehzffuzninnjpunoiohusckirbbrvbwgyqdsfxnbnqfpuhlygcdxteqivospmupljyrforttedezdfcitqbnrmfmubrgtkhxuzqboswnrxaseeojjtgbmqjhqqudhhzqdglhchlqluqswpqdshwmohbntqciryzkzfprxzvggxztezpklgtdodxlezdseyabkqdvvqizgwhlemfknextbijrnbxgfnonnutztbjbxlibrrejczsukfnkgpgfcmoituufaeudmcnppjqzyalukkmydxyaaufaegsysvnpxtttgwdkxyzdfsmcxexczifvnoldnztmnikkaqbjujfrazikqcjcxsnezqvznlrxxtgprrqrypzmyngvrlkwoiprwmzbzrtqryfxwrslhdduvwlsohqkizdvhxlnlouztdfpqyoiszpljnjaimbimdavtavmkaqhjqnqsketahwyvicflgbjsiqtxuzcpjjznwotdyfxywrsgxlubrodhvrfdxfzkezfgmegiqtwnygvlwaoahsjegrqzekfksmzeqjrrbycrnmpettgqzdavaixodkmrpqnlglohymiyduwegxbqqreockogatvhvnwpyqryugihqaspfjhvpcnmlnpsbfqfhhdqdzvnzouzazhedpgzgciwoxqqwqwegnkbfkhanekyklxuknqollvmahidbjebxqwvygqaofxvvgvzazqqqlkblelmcoqwycemoqliywrchioznfosycfldocpoktvgbziybmrfxljxcicbooldbhzezlpdikodwcmsqmrdyswejrwpymqjpelxhqanayicdckawtwwzxlgzxccdbichkjeahaldhlyuluytartmtqcjmxdehvsvwhsivtwhbfrdxukrnikzenzyyzfmqhtkgwiukvoyhgjjdjpfhhvywiopgjznujjldpvpgkqguwugorknprhduvucvtmxhgkvkevlyigjaoojiodgnmimkhgeoqdvgjrokswjjvswetfrgbroyrwqxntojygwevfskmiusoszcfpbasxlleimlgeyprobxowhlkgkkusxfouwphzpzzsdrsosyrlltpzaixdwncapuujsqkjizeduncjymrfjjtgatcidaceicmhwlftjevtaajtezmfuaooawdliazbjntrsgrgxpzqzgfvgzkabieahppxjvsekzpjjucqkrllkhcxiayoajiyisovcektwvnytqntcneahiwwahtfrnntbnwccmfyfkenckdnotxzfiszxfgzqhoadtikwnlobaebdhuemanwimdskhszqithgehleqoijcnkvruhlqzbsyoyabwtvavzvquwzammhajgbqysxiimxzpmcisrdxlvmzyaocegzadsqheodsaptrmoctzntcnbbljkhwmaoyezjwdpdgrviyeejhinzmogwtcjzdjpmxcjtjasutxtyanwnivsuqlhyxeyaxbrmfeyhnqloncsvdeununumttlkkvtqxnwyobgaiatxrkcwjwtfvciwxuozqqdwvxyrnrrmgfqqzubmibqtgvoykwenxmcbocamryxuocuzinktfqudxqwyilynngkomwehfglytweqmzszkkmutctkdwtstkflexmmodrohjbnzpsdnesuhuqzgtynmxkyhmifxzdrozodnofgjzaanldvzocyhhcatcykcsacmbyctmbqcdzfavvnohzbxggwobpeqzmjqhijkjlgspvtfubzotiyqziskrodaloamldzsxkbewmrvrppgeliztqkuphvlrqkchlhjyentxnoonglqlcrwovhtwagiwvhfwhrnemfzvmbscuxzyiesonmhyoruhctolmeousjoentspcqnlipirxtfljvxhglxcfjmltvljdoieyuuhagfzbnfgcttpgtqmkzccnxaleyajzjbhfmkulqhusfohvgujmnutnoftswwfhdhwwbudaohrmkgufdnlsashvvhsjumiovehnrgeuikbtbouroiemlcgjkqqfzeewuegjbeocvsvtpzesayoiqnngrbhdhmriadziirgdukbkrarxbuvgmodqmdoubiuxqzzgccfnbecgywwzhrebidfdzfcqqssycaiprhkiiuckysfvvumsgetgxmmiqnjxmnhlidpxtajenvunhypnrbuxfbzaepsbgdcdnfmxchjotcztmetaimurwdtwhuokscqqpxqfdxuylbgtmxcnhpgtsaveezcpzdtdnvjwdjclvjmcazvxvuaolewnncwkrfijmjgliohtanxybjutkkjlefszbasvikfjsjwzuibdobgzekhlwkxatwtepulmosfaivdlsgzogoiwyzcvfqdrrvsomqxhbjhgutyhsvfopyscdoyzvycccobszmmiotogmwrtquqpdxuhxccxuhrysxymvfxdfzbswrefajrmezjeefgxkwcmvrulijtcuxckvoojiecfupzrzdzwjumuovfklxfgujgctlvscaprckeacnqjcwwqnuuiirinsepqdbafcyrzjihddrfbcktanqpdcuruuytbhncbjzdkbfnvcgrkjzfnookmpbfhhggolmcfczsitlxlbfmcguaygfsfsppzjqkcvtdiznhojpflesvqvyiqmmdcgqabfxwxcjfnbnztmoqlybwvtuiouikqjbfmfocxnugtzrivsjorylemsrjhplmnxlyqfupomzlrlvwjtimqhjwauweyubulypgcbbwfdouqcuebdtirkyoycwlsnsdgvwhcellnootcvalafeovkkycbsllszykrukblfkdturqjzwmyhggwypfhsddbipjxybdjmkfkwmbqkjbdcawivhtgwhdlippxanwoyvvvmridpfjnjjaslrfpivzylyimzqezanaxvxmwwvkonbruwzpecjbepnixskrzqcyhmhuetyxkffegvxncszizewugogcrcjvuccywdlczrgcnaiyihmvgldgucyfaojjdwaimsslunrhqfyiskqpfdmnoxazdsgacanlvlutdvddisfkougvrbrcqawwfbwfwlwzhupwofojjmdhtykwzapqarpfergmitjdsjhsegzctkdeilvocqexxjvzplnzfmdyhmxozkqtesujwqijnnvmllzwmtjephrjttfaddlzlxjcsaagvboshhvulqeibfpmbpofdhxcuzufkogubsttuakhqdlqdsiifnpymttmkukflzokmgenhosdvfdjnpgvspuphrbcwgmcjsssbqixvsgaxxdochypxffhhglohtojrhrswzjblldzhmdhrmwydqkdeonytrqvxdxgmxtcuokarfmuhassmeqmkexavcqbvdsiawggxjwlirfmsoqqfecopjfbtapdudegeoowpmqlibkvytdxspyklgwnkqggapfqsuoidyyvsrprxcdysjooyanbdqvtqsnvndzqpgenrqkwgxxhzxhnhocppmjbxlejyxyjamodtybhhexhbvttbjdwftcwsfiirrzmiqnbohhlahlktukqzzxiflmxwfptqyxhppgcbpthyhwrhqcrycsxkzmlhximnvdleajsfkbvqbaiqulitaaipkpwvfwooatxwfrmxogmpbjllqkhjvedrsocafmbbqxitszcttwkfgcmnoxnpxamktqrivvgkzbgaqaqhwukoqppfephouxbkbpmkbmelhqummpypvvymxpdpcrylacygnvpzyrkpxfbwuronqiunoliympbpklvbpvrsbokywrrmugpqopgpmmgfpvvvbomqvyqzrbyqgcvyvxaymqnnyqwqemgsmigpwfjuv"],
    ],
    [
        true, false, true, true, false, true, false, true, false, true, false, true, false, true, false, true,
    ]
]
for (let i in actualParam) Test.assertEquals(checkInclusion(...actualParam[i]), expectedParam[i])

你可能感兴趣的:(算法与数据结构,算法,前端)