Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
おうちでKMP法
Search
akht
April 24, 2020
2
430
おうちでKMP法
akht
April 24, 2020
Tweet
Share
More Decks by akht
See All by akht
create-my-own-smart-contract-languages-using-llvm-1
akht
0
250
NFT tsukutte asobo
akht
1
420
What is a DAO ?
akht
0
250
create AkhToken
akht
0
57
Evaluate PHP mail in Go
akht
0
340
ソートアルゴリズム101/Sorting Algorithms 101
akht
1
410
Featured
See All Featured
For a Future-Friendly Web
brad_frost
175
9.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Done Done
chrislema
181
16k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Optimising Largest Contentful Paint
csswizardry
33
3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
The World Runs on Bad Software
bkeepers
PRO
65
11k
BBQ
matthewcrist
85
9.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
What's in a price? How to price your products and services
michaelherold
243
12k
Transcript
4UBZ)PNF ాতਔ(.01FQBCP *OD ࣛࣇౡNL ͓͏ͪͰ,.1๏
ΤϯδχΞ ాতਔ!BLIU@JLE $50ࣨࣛࣇౡΦϑΟενʔϜ BLIUJLEDPN
"#$ͷதʹ#ؚ·Ε͍ͯ·͔͢ʁ 2
"#$ͷதʹ#ؚ·Ε͍ͯ·͔͢ʁ " ͑ɿ:FT "#$
""#"##"#"#$"# ͷதʹ "#"#$" ؚ·Ε͍ͯ·͔͢ʁ 2
" ͑ɿ:FT ""#"##"#"#$"# ""#"##"#"#$"# ͷதʹ "#"#$" ؚ·Ε͍ͯ·͔͢ʁ
""#"##"#$"$"# ͷதʹ "#"#$" ؚ·Ε͍ͯ·͔͢ʁ 2
" ͑ɿ/P ""#"##"#$"$"# ""#"##"#$"$"# ͷதʹ "#"#$" ؚ·Ε͍ͯ·͔͢ʁ
͜ΕΛఆ͢Δ͜ͱΛߟ͑Δ จࣈྻQBUUFSO͕ɺݕࡧରจࣈྻUFYUͷ ͲͷҐஔʹଘࡏ͢Δ͔Λݟ͚ͭΔ
ํ๏ɿྗ·͔ͤ๏
ྗ·͔ͤ๏ A A B A B B A B A
B C A B A B A B C A A B A B C A A B A B C A A B A B C A A B A B C A A B A B C A A B A B C A 5FYU 1BUUFSO ! ! ! ! ! ! "" ❌ ❌ ❌ ❌ ❌ ❌
ྗ·͔ͤ๏ wૉͳํ๏ w UFYU ""#"##"#"#$"# ͱQBUUFSO "#"#$" ͷઌ಄͔Βจࣈͣͭൺֱ w QBUUFSOͷશͯʹҰகͨ͠ΒऴྃɺෆҰக͕֬ఆͨ͠ΒଧͪͬͯUFYUͷ࣍ͷҐஔ͔Βൺ
ֱΛ։࢝ w UFYUͷจࣈྻºQBUUFSOͷจࣈྻ ճͷൺֱ͕ඞཁ ࠷ѱ w࠷ѱܭࢉྔɿ0 /. wΘ͔Γ͍͚͢Ͳखॱʹແବ͕͋Δʢແବͱʁʣ
ྗ·͔ͤ๏ A A B A B B A B A
B C A B A B A B C A A B A B C A ˢ͜͜ͰෆҰகͩͬͨͱ͖ A B A B C A ˢUFYUͷ։࢝ҐஔΛจࣈͣΒͯ͠ ɹ·ͨQBUUFSOͷઌ಄͔ΒൺֱΛ࠶։͢ΔͷແବͰʁ ɹUFYUͷΠϯσοΫε͕ޙΓͯ͠͠·ͬͯΔ ˢઌ಄ͷ"#͕Ϛον͢ΔͷΘ͔Γ͖ͬͯΔΜ͔ͩΒ ɹ͔͜͜ΒൺֱΛ࠶։ͨ͠Β͍͍͡ΌΜ,.1๏ ❌
ํ๏ɿ,.1๏ ΫψʔεrϞϦεrϓϥοτ๏ʢ,OVUIr.PSSJTr1SBUUBMHPSJUIN
,.1๏ wจࣈҐஔΛεΩοϓͯ͠ແବΛল͘ wQBUUFSOจࣈྻ͔ΒͣΒ͠දͱ͍͏ͷΛ࡞Δ wUFYUͱQBUUFSOͷෆҰக͕ى͖ͨͱ͖ɺ࣍ʹQBUUFSOจࣈྻͷͲͷҐ ஔ͔ΒൺֱΛ࠶։͢Δ͔ΛͣΒ͠දΛΈܾͯΊΔ wUFYUͷΠϯσοΫεޙΓͤ͞ͳ͍ A B A B
C A 0 0 1 2 0 1
,.1๏ A A B A B B A B A
B C A B A B A B C A ˢ͜͜ͰෆҰகͩͬͨͱ͖ͣΒ͠දΛΈΔ ͻͱͭલͷ#ͷࣈΛݟΔ A B A B C A ˢͣΒ͠ද͕ͳͷͰΠϯσοΫε͕ͷҐஔ͔Βൺֱ࠶։ ɹ͜ͷ࣌ɺUFYUͷΠϯσοΫεޙΓͯ͠ͳ͍ʂ A B A B C A 0 0 1 2 0 1 ❌
,.1๏ A A B A B B A B A
B C A B A B A B C A A B A B C A A B A B C A A B A B C A 5FYU 1BUUFSO ! ! ! "" ❌ ❌ ❌ A B A B C A 0 0 1 2 0 1
ྗ·͔ͤ๏ ൺֱ༻ A A B A B B A B
A B C A B A B A B C A A B A B C A A B A B C A A B A B C A A B A B C A A B A B C A A B A B C A 5FYU 1BUUFSO ! ! ! ! ! ! "" ❌ ❌ ❌ ❌ ❌ ❌
,.1๏ wQBUUFSOจࣈྻͷͣΒ͠දͱͳΜͳͷ͔ʁ wͦͷจࣈ࣌Ͱɺલͷαϒจࣈྻ͕ઌ಄͔ΒͷαϒจࣈྻͱҰக͢ Δ͞ wཁ͢Δʹɺ͢Ͱʹग़͖ͯͨͷ͔Ͳ͏͔Λه͓ͯ͘͠ w࠷ѱܭࢉྔɿ0 / . ʢ/දߏங .UFYUͷ͞ʣ
A B A B C A 0 0 1 2 0 1
ͣΒ͠දͷ࡞ ݕࡧ
ޮΑ͘Ͱ͖ͯΊͰͨ͠ʂ Ͱͳ͍
࣮༻্ͷ wྗ·͔ͤ๏ɿ0 /. ɺ,.1๏ɿ0 / . ͱ͍͏ͷ࠷ѱέʔεͷ wྗ·͔ͤ๏͕͍ͷዞҙతͳέʔε wUFYUBBBBBBBBBBBBBBBBBBBBBBC QBUUFSOBBBBBBCΈ͍ͨͳ
wQBUUFSOͷ࠷ޙ·Ͱݟͳ͍ͱஅͰ͖ͳ͍Α͏ͳͷ w࣮༻্࠷ॳͷจࣈͰෆҰகʹͳΔͷͰ0 / ͱΈͳͤΔ wͭ·Γ࣮༻্ྗ·͔ͤ๏ͷ΄͏͕͍ ,.1๏ཧతʹॏཁ
จࣈྻݕࡧΞϧΰϦζϜ wྗ·͔ͤ๏ɺ,.1๏Ҏ֎ʹ৭ʑ͋Δ w#.๏ʢϘΠϠʔϜʔΞ๏ʣཧతʹ࣮༻తʹ༏ΕΔ wΤΠϗrίϥγοΫ๏ wϥϏϯΧʔϓ๏ wͳͲ w࣍ճ#.๏ʹ͍ͭͯ͠·͢ʂ̍