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
420
おうちで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
240
NFT tsukutte asobo
akht
1
410
What is a DAO ?
akht
0
240
create AkhToken
akht
0
57
Evaluate PHP mail in Go
akht
0
330
ソートアルゴリズム101/Sorting Algorithms 101
akht
1
410
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Git: the NoSQL Database
bkeepers
PRO
427
64k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
The Invisible Side of Design
smashingmag
298
50k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
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࣍ճ#.๏ʹ͍ͭͯ͠·͢ʂ̍