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
Double-Array Build
Search
jojonki
November 20, 2019
Technology
0
6.5k
Double-Array Build
jojonki
November 20, 2019
Tweet
Share
More Decks by jojonki
See All by jojonki
Network Simplex
jojonki
0
2.5k
Visualizing Receptive Field
jojonki
0
110
Backpropagation Cheet Sheet
jojonki
0
150
Minimum Cost
jojonki
0
6.5k
Double-Array Search
jojonki
0
6.6k
Other Decks in Technology
See All in Technology
AWS re:Invent 2024 ふりかえり勉強会
yhana
0
650
Qiita埋め込み用スライド
naoki_0531
0
5.4k
10年もののバグを退治した話
n_seki
0
120
ネットワーク可視化の世界
likr
7
5.5k
OPENLOGI Company Profile for engineer
hr01
1
17k
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
32k
スケールし続ける事業とサービスを支える組織とアーキテクチャの生き残り戦略 / The survival strategy for Money Forward’s engineering.
moneyforward
0
170
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
23
6.6k
20241228 - 成為最強魔法使!AI 實時生成比賽的策略 @ 2024 SD AI 年會
dpys
0
280
UI State設計とテスト方針
rmakiyama
4
910
Web APIをなぜつくるのか
mikanichinose
0
1.3k
プロダクト組織で取り組むアドベントカレンダー/Advent Calendar in Product Teams
mixplace
0
580
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
930
Automating Front-end Workflow
addyosmani
1366
200k
Embracing the Ebb and Flow
colly
84
4.5k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
190
It's Worth the Effort
3n
183
28k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
A designer walks into a library…
pauljervisheath
205
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Designing for humans not robots
tammielis
250
25k
Transcript
0 0 0 0 0 0 0 0 0 0
0 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc ߏஙͯ͠ΈΑ͏ʂ 0 0 7
0 0 0 0 0 0 0 0 0 0
0 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “a#”Λొʂ base[1] >= 1ͷ݅Ͱɼ base[1]+code(a) == ະ༻index Λ୳͢ base0ະ༻Λද͢ͷͰ 1Ҏ্Ληοτ͢Δඞཁ͕͋Δ 0 0 7
1 0 0 0 0 0 0 0 0 0
0 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “a#”Λొʂ base[1] == 1ͷ࣌ɼbase[1]+code(a) == 2 index 2ະ༻ͳͷͰOK! 0 0 7
1 0 0 0 0 0 0 0 0 0
0 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “a#”Λొʂ index 1͕ભҠݩͳͷͰɼcheck[2]=1Ληοτ 0 0 7
1 0 0 0 0 0 0 0 0 0
0 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “a#”Λొʂ aͷ࣍ऴจࣈ#Λొ͢Δ base[2] >= 1ͷ݅Ͱɼbase[2]+code(#) == ະ༻index Λ୳͢ 0 0 7
1 0 0 0 0 3 0 0 0 0
0 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “a#”Λొʂ base[2] == 3ͷ࣌ɼbase[2]+code(#) == 3 index 3ະ༻ͳͷͰOK! 0 0 7
1 0 0 0 0 3 0 0 0 0
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “a#”Λొʂ Index 2͕ભҠݩͳͷͰɼcheck[3]=2Ληοτ 0 0 7
1 0 0 0 -1 3 0 0 0 0
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “a#”Λొʂ ऴจࣈΛొͨ͠ͷͰ baseΛ-1ʹͯ͠ऴྃ base0ະ༻index baseΛ-1ऴϊʔυΛҙຯ͢Δ 0 0 7
1 0 0 0 -1 3 0 0 0 0
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ base[1]طʹηοτࡁΈͳͷͰ Index (base[1]+code(b))͕ະ༻or check͕ਖ਼͍͔͠νΣοΫ 0 0 7
1 0 0 0 -1 3 0 0 0 0
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ check[3] != 1ͳͷͰବʂίϯϑϦΫτ͕ൃੜ… base[1]Γ͠ 0 0 7
1 0 0 0 -1 3 0 0 0 0
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ index 1Λʹ࣋ͭϊʔυΛͯ͢୳͢ index 2͕֘ 0 0 7
1 0 0 0 -1 3 0 0 0 0
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ 2 (index൪߸) - check[2] = 1 == code(a) ͭ·Γindex 2ɼindex 1͔ΒaΛొͨ͠ભҠ 0 0 7
0 0 0 0 -1 3 0 0 0 0
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ ΑͬͯɼaͱbΛindex 1͔Βొ͢Δඞཁ͕͋Δ base[1]Λ·ͣ0Ϧηοτʂ aͷݩભҠઌޙͰ͏ͷͰ͓֮͑ͯ͘ 0 0 7
? 0 0 0 -1 3 0 0 0 0
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ base[1] >= 1ͷ݅Ͱɼbase[1]+code(a) ͱbase[1]+code(b)͕ ͍ͣΕະ༻ͳindexͱͳΔΛ୳͢ 0 0
3 0 0 0 -1 3 0 1 0 1
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ base[1] = 3ͱ͢Δͱɼa, b͍ͣΕొͰ͖ͦ͏ͩ bͷભҠ aͷભҠ 0 0 7
3 0 0 3 -1 3 0 1 0 1
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ a͕͚มΘͬͨͷͰɼݩભҠઌ͔ΒbaseΛίϐʔ aͷݩભҠઌ aͷ৽ભҠઌ 0 0 7
3 0 0 3 -1 3 0 1 0 1
2 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ aͷݩભҠઌΛʹ࣋ͭϊʔυΛͯ͢୳͢ index 3͕֘ aͷݩભҠઌ aͷ৽ભҠઌ 0 0 7
3 0 0 3 -1 3 0 1 0 1
4 1 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ aindex 4ʹҠͬͨͷͰɼ ϊʔυͷॴʢcheckʣΛ4ʹߋ৽ aͷݩભҠઌ aͷ৽ભҠઌ 0 0 7
3 0 0 3 -1 0 0 1 0 1
4 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ aͷݩભҠઌͷbaseͱcheck ৽ભҠઌʹҠߦͰ͖ͨͷͰϦηοτ ͜ΕͰίϯϑϦΫτΛղফͰ͖ͨ aͷݩભҠઌ aͷ৽ભҠઌ 0 0 7
3 0 0 3 -1 0 0 1 0 1
4 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ ొ࡞ۀʹΔ b·ͰొͰ͖͍ͯͨͷͰcΛొ bͷભҠઌ 0 0 7
3 0 0 3 -1 0 0 1 0 1
4 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ base[5] >= 1ͷ݅Ͱɼ base[5]+code(c) == ະ༻index Λ୳͢ 0 0 7
3 3 0 3 -1 0 0 1 0 1
4 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ base[5] == 3ͷ࣌ɼbase[5]+code(c) == 6 index 6ະ༻ͳͷͰOK! 0 0 7
3 3 0 3 -1 0 0 1 5 1
4 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ index 5͕ભҠݩͳͷͰɼcheck[6]=7Ληοτ 0 0 7
3 3 0 3 -1 0 0 1 5 1
4 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ base[6] >= 1ͷ݅Ͱɼ base[6]+code(#) == ະ༻index Λ୳͢ 0 0 7
3 3 7 3 -1 0 0 1 5 1
4 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ base[6] == 7ͷ࣌ɼbase[6]+code(#) == 6 index 6ະ༻ͳͷͰOK! 0 0 7
6 3 3 7 3 -1 0 0 1 5
1 4 0 base check index 1 2 5 4 6 3 จࣈίʔυ #: 0 a: 1 b: 2 c: 3 ޠኮࣙॻ a bc “bc#”Λొʂ check[7]ʹભҠݩindex 6Ληοτ ऴจࣈͳͷͰbase[7]ʹ-1Ληοτͯ͠ऴྃ -1 7