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
体を使ったアルゴリズム体験
Search
Katsuyoshi Ito
November 21, 2013
Programming
0
77
体を使ったアルゴリズム体験
配列を椅子で表現し、参加者が椅子に座ったり移動したりして体を使って配列を体験してもらいました。
デジコミュ秋田 2013 のAkita Ruby Meetingの セッションで行いました。
Katsuyoshi Ito
November 21, 2013
Tweet
Share
More Decks by Katsuyoshi Ito
See All by Katsuyoshi Ito
irBoard(アイアールボード) について
itosoft
0
340
Ladder Drive - To start IoT for manufacturing.
itosoft
0
45
irBoardの紹介と クラウドサービスの活用
itosoft
1
390
irBoard活用可能性
itosoft
0
100
東北IT物産展2016スポンサーLT
itosoft
0
69
iQ-FとirBoardの接続設定
itosoft
0
580
iQ-RとirBoardの接続設定
itosoft
0
610
デジコミュ秋田 2015 オープニング
itosoft
0
1.5k
デジコミュ秋田 2015 LT 極上の密林
itosoft
0
420
Other Decks in Programming
See All in Programming
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
Jakarta EE meets AI
ivargrimstad
0
560
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
Ethereum_.pdf
nekomatu
0
460
距離関数を極める! / SESSIONS 2024
gam0022
0
280
Outline View in SwiftUI
1024jp
1
330
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
CSC509 Lecture 12
javiergs
PRO
0
160
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
920
CSC509 Lecture 11
javiergs
PRO
0
180
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Building Your Own Lightsaber
phodgson
103
6.1k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Navigating Team Friction
lara
183
14k
Designing for humans not robots
tammielis
250
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Transcript
ମΛͬͨΞϧΰϦζϜମݧ Akita Ruby Meeting(ळాRubyָ͓͠Έձ) σδίϛϡळా 2013 2013/11/16 Akita Ruby Meeting
ҏ౻উྑ
Akita Ruby Meeting Akita Ruby MeetingळాͰRubyΛೖΓޱͱ ͯ͠ϓϩάϥϛϯάΛָ͠Έ͍ͨํͷձͰ͢ɻ
Ruby
Ruby
Ruby
Ruby Rubyͱ... Φʔϓϯιʔεͷಈతͳϓϩάϥϛϯ άݴޠͰɺ γϯϓϧ͞ͱߴ͍ੜ࢈ੑΛ උ ͍͑ͯ·͢ɻ ΤϨΨϯτͳจ๏Λ ࣋ͪɺࣗવʹಡΈॻ͖͕Ͱ͖·͢ɻ https://www.ruby-lang.org/ja/
γϯϓϧ͞ http://www.akitafan.com/akitaben/chobun.html όϦτϯҏ౻ͷळాหߨ࠲ΑΓ
ߴ͍ੜ࢈ੑ
ߴ͍ੜ࢈ੑ
ळాͱੑ͕ߴ͍ ΤϨΨϯτదͳͷ͕ݟͨΓ·ͤΜͰͨ͠ɻorz
͍ͭΔ͔
͍ͭΔ͔
͍ͭΔ͔ ִ݄(ࠓͷॴح݄) ఆظ։࠵5݄͔Β࢝Ί·ͨ͠ ਫ༵(͍͍ͩͨୈҰ) 18:15 - 20:45
ͳʹΔ͔ ࣗश ຊΛݟͨΓ ωοτΛݟͨΓ ֤ࣗͷϖʔεͰ Ռൃද
͜Μͳ͔Μ͡
None
None
http://akitarubymeeting.doorkeeper.jp
ࠓͷ༰ ମΛͬͨΞϧΰϦζϜମݧ
ΞϧΰϦζϜʁ
ΞϧΰϦζϜ͍ͨͦ͏ʁ
ΞϧΰϦζϜ ΞϧΰϦζϜʢӳAlgorithmʣͱɺֶɺίϯϐϡʔςΟϯάɺݴ ޠֶɺ͋Δ͍ؔ࿈͢Δʹ͓͍ͯɺΛղͨ͘ΊͷखॱΛఆࣜ Խͨ͠ܗͰදݱͨ͠ͷΛݴ͏ɻࢉ๏ʢ͞ΜΆ͏ʣͱ༁͞ΕΔ͜ͱ ͋Δɻ ͦͷղΛ͍࣋ͬͯΔ͕ɺΞϧΰϦζϜਖ਼ͦ͘͠ͷղΛಘΔͨ Ίͷ۩ମతखॱΛ༩͑Δɻ͞Βʹଟ͘ͷ߹ʹޮੑ͕ॏཁͱͳΔɻ ίϯϐϡʔλʹΞϧΰϦζϜΛࢦࣔ͢ΔͨΊͷʢిࢠʣจॻΛϓϩά ϥϜͱ͍͏ɻਓؒΑΓ͘େྔʹਖ਼͍݁͠ՌΛಋ͘͜ͱ͕Ͱ͖Δͷ͕ ίϯϐϡʔλͷڧΈͰ͋Δ͕ɺͦͷͨΊʹϓϩάϥϜਖ਼͘͠ޮ
తͳΞϧΰϦζϜʹجͮ͘͜ͱ͕ඞཁͰ͋Δɻ WikipediaΑΓ
ΞϧΰϦζϜ Λղͨ͘Ίͷखॱ
ʁ
ʁ iTunesͰϓϨΠϦετΛ࡞Δ
ʁ iTunesͰϓϨΠϦετΛ࡞Δ બ
ʁ iTunesͰϓϨΠϦετΛ࡞Δ બ Ճ
ʁ iTunesͰϓϨΠϦετΛ࡞Δ બ Ճ আ
ʁ iTunesͰϓϨΠϦετΛ࡞Δ બ Ճ আ ฒସ͑
ʁ iTunesͰϓϨΠϦετΛ࡞Δ બ Ճ আ ฒସ͑ γϟοϑϧ
ཪଆΛશ෦ݟͤ·͢
ཪଆΛগ͠શ෦ݟͤ·͢
ϓϩάϥϜ
ϓϩάϥϜ ม
ϓϩάϥϜ ม ೖΕ
ϓϩάϥϜ ม ೖΕ
ೖΕ 1 2 3 + = 1 2 3 4
5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
ྻ ೖΕͷҰͭ ೖΕΛฒͨͷ
ྻ 10ݸͷ͞ͷྻΛͭ͘Γ·͢ ҜࢠΛฒͯྻΛ࡞Γ·͠ΐ͏ ...
ྻ A-J·Ͱॱ൪ʹฒ·͢
ྻ A-J·Ͱॱ൪ʹฒ·͢ A B C D I J ...
ྻ 5൪ԿͰ͔͢ʁ A B C D I J ...
ྻ 5൪ԿͰ͔͢ʁ A B C D E
ྻ 5൪ԿͰ͔͢ʁ A B C D E ΟʔͰ͢Ͷ
ྻ RubyͰ0͔Β͑Δ 5൪ԿͰ͔͢ʁ A B C E D
ྻ RubyͰ0͔Β͑Δ 5൪ԿͰ͔͢ʁ A B C E F D
ྻ RubyͰ0͔Β͑Δ 5൪ԿͰ͔͢ʁ A B C E F ΤϑͰ͢Ͷ D
ྻ A B C E D F J ...
ྻ ೖΕʹ൪߸͕ৼΒΕͯ·͢ɻ A B C E D F J ...
ྻ ೖΕʹ൪߸͕ৼΒΕͯ·͢ɻ A B C E D F J ...
0 1 2 3 4 5 9
ྻ ೖΕʹ൪߸͕ৼΒΕͯ·͢ɻ ൪߸ΛৼͬͯΈ·͠ΐ͏ A B C E D F J
... 0 1 2 3 4 5 9
Ճ KΛՃ͢Δʹʁ A B C E D F J ...
K
Ճ KΛՃ͢Δʹʁ A B C E D F J ...
0 1 2 3 4 5 9 K
Ճ KΛՃ͢Δʹʁ ೖΕΛ͢ඞཁ͕͋Γ·͢ A B C E D F J
... K 10
Ճ KΛՃ͢Δʹʁ ೖΕΛ͢ඞཁ͕͋Γ·͢ A B C E D F J
... 0 1 2 3 4 5 9 K 10
ૠೖ Ұͭஔ͖ʹஔ HΛGɺIͷؒʹೖΕΔʹʁ A C E I G H
ૠೖ Ұͭஔ͖ʹஔ HΛGɺIͷؒʹೖΕΔʹʁ A C E I G 0 1
2 3 4 H
ૠೖ Ұͭஔ͖ʹஔ HΛGɺIͷؒʹೖΕΔʹʁ IΛͣΒͯ͠HΛؒʹೖΕΔ A C E I G H
5
ૠೖ Ұͭஔ͖ʹஔ HΛGɺIͷؒʹೖΕΔʹʁ IΛͣΒͯ͠HΛؒʹೖΕΔ A C E I G 0
1 2 3 4 H 5
ૠೖ BΛAɺCͷؒʹೖΕΔʹʁ A C E I G H 5 B
ૠೖ BΛAɺCͷؒʹೖΕΔʹʁ A C E I G 0 1 2
3 4 H 5 B
ૠೖ BΛAɺCͷؒʹೖΕΔʹʁ CҎ߱શ෦ΛͣΒ͔ͯ͠ΒBΛೖΕΔ A C E I G H 5
B 6
ૠೖ BΛAɺCͷؒʹೖΕΔʹʁ CҎ߱શ෦ΛͣΒ͔ͯ͠ΒBΛೖΕΔ A C E I G 0 1
2 3 4 H 5 B 6
আ HΛऔΓআ͘ʹʁ A C E I G H 5 B
6
আ HΛऔΓআ͘ʹʁ A C E I G 0 1 2
3 4 H 5 B 6
আ HΛऔΓআ͍ͯ IΛͣΒ͠·͢ɻ A C E I G H 5
B ×
আ HΛऔΓআ͍ͯ IΛͣΒ͠·͢ɻ A C E I G 0 1
2 3 4 H 5 B ×
আ BΛऔΓআ͘ʹʁ A C E I G 5 B
আ BΛऔΓআ͘ʹʁ A C E I G 0 1 2
3 4 5 B
আ BΛऔΓআ͍ͯ CҎ߱શͯΛͣΒ͢ A C E I G 5 B
আ BΛऔΓআ͍ͯ CҎ߱શͯΛͣΒ͢ A C E I G 0 1
2 3 4 5 B
ෆಘҙ ͕ଟ͍߹ʁ A C E JJJ G H 9999 B
...
ෆಘҙ ͕ଟ͍߹ʁ A C E JJJ G 0 1 2
3 4 H 9999 B ...
Ωϡʔ Ϩδ 1 Ϩδ 2 Ϩδ 3 ਓ ਓ ਓ
ਓ ਓ ਓ ਓ ਓ ਓ ਓ ਓ ਓ
Ωϡʔ ઌೖΕઌͩ͠(FIFO) Ϩδ 1 ਓ ਓ ਓ ਓ 0 1
2 3
Ωϡʔ ઌೖΕઌͩ͠ Ϩδ 1 ਓ ਓ ਓ ਓ 0 1
2 3
Ωϡʔ ઌೖΕઌͩ͠ Ϩδ 1 ਓ ਓ ਓ ਓ 0 1
2 3
Ωϡʔ Ϩδ 1 Ϩδ 2 Ϩδ 3 ਓ ਓ ਓ
ਓ ਓ ਓ ਓ ਓ ਓ ਓ ×
Ωϡʔ Ϩδ 1 Ϩδ 2 Ϩδ 3 ਓ ਓ ਓ
ਓ ਓ
Ωϡʔ Ϩδ τΠϨ ATM σΟζχʔϥϯυ
ελοΫ ޙೖΕઌग़͠(LIFO) 0 1 2 3 4
ελοΫ ੵΈ্͛(ຊ)
ฒସ͑ A͔Βॱ൪ʹฒ·͠ΐ͏ ͱΓ͋͑ͣͬͯΈΑ͏ A C J F E G D
0 1 2 3 4 5 9 B H I 6 7 8
ૠೖιʔτ ࠨʹ͕ࣗೖΕΔॴ·ͰҠಈ τϥϯϓͷฒସ͑ΛΠϝʔδ D E A C B 0 1
2 3 4
ૠೖιʔτ 1൪ͷEΛௐΔ DΑΓେ͖͍ͷͰͦ·· D E A C B 0 1
2 3 4
ૠೖιʔτ 2൪ͷAΛௐΔ EΑΓখ͍͞ͷͰࠨͱަ D E A C B 0 1
2 3 4
ૠೖιʔτ DΑΓখ͍͞ͷͰࠨͱަ D E A C B 0 1 2
3 4
ૠೖιʔτ DΑΓখ͍͞ͷͰࠨͱަ ࠨ͕ͳ͍ͷͰ֬ఆ D E A C B 0 1
2 3 4
ૠೖιʔτ 3൪ͷBΛௐΔ EΑΓখ͍͞ͷͰࠨͱަ D E A C B 0 1
2 3 4
ૠೖιʔτ DΑΓখ͍͞ͷͰࠨͱަ D E A C B 0 1 2
3 4
ૠೖιʔτ AΑΓେ͖͍ͷͰ֬ఆ D E A C B 0 1 2
3 4
ૠೖιʔτ 4൪ͷCΛௐΔ EΑΓখ͍͞ͷͰࠨͱަ D E A C B 0 1
2 3 4
ૠೖιʔτ 4൪ͷCΛௐΔ EΑΓখ͍͞ͷͰࠨͱަ D E A C B 0 1
2 3 4
ૠೖιʔτ DΑΓখ͍͞ͷͰࠨͱަ D E A C B 0 1 2
3 4
ૠೖιʔτ BΑΓେ͖͍ͷͰ֬ఆ D E A C B 0 1 2
3 4
ૠೖιʔτ ྃ D E A C B 0 1 2
3 4
όϒϧιʔτ ӈྡͱൺֱ͠େ͖͍ͲΜͲΜӈʹ D E A C B 0 1 2
3 4
όϒϧιʔτ DͱEΛൺֱ E͕େ͖͍ͷͰͦͷ·· D E A C B 0 1
2 3 4
όϒϧιʔτ EͱAΛൺֱ D E A C B 0 1 2
3 4
όϒϧιʔτ E͕େ͖͍ͷͰަ D E A C B 0 1 2
3 4
όϒϧιʔτ EͱBΛൺֱ D E A C B 0 1 2
3 4
όϒϧιʔτ E͕େ͖͍ͷͰަ D E A C B 0 1 2
3 4
όϒϧιʔτ EͱCΛൺֱ D E A C B 0 1 2
3 4
όϒϧιʔτ E͕େ͖͍ͷͰަ D E A C B 0 1 2
3 4
όϒϧιʔτ E֬ఆ D E A C B 0 1 2
3 4
όϒϧιʔτ DͱAΛൺֱ D E A C B 0 1 2
3 4
όϒϧιʔτ D͕େ͖͍ͷͰަ D E A C B 0 1 2
3 4
όϒϧιʔτ DͱBΛൺֱ D E A C B 0 1 2
3 4
όϒϧιʔτ D͕େ͖͍ͷͰަ D E A C B 0 1 2
3 4
όϒϧιʔτ DͱCΛൺֱ D E A C B 0 1 2
3 4
όϒϧιʔτ D͕େ͖͍ͷͰަ D E A C B 0 1 2
3 4
όϒϧιʔτ D֬ఆ D E A C B 0 1 2
3 4
όϒϧιʔτ AͱBΛൺֱ ͦͷ·· D E A C B 0 1
2 3 4
όϒϧιʔτ BͱCΛൺֱ ͦͷ·· D E A C B 0 1
2 3 4
όϒϧιʔτ C֬ఆ D E A C B 0 1 2
3 4
όϒϧιʔτ AͱBΛൺֱ ͦͷ·· D E A C B 0 1
2 3 4
όϒϧιʔτ ྃ D E A C B 0 1 2
3 4
छྨ
ಈը ૠೖιʔτ http://www.youtube.com/watch? v=ROalU379l3U όϒϧιʔτ http://www.youtube.com/watch? v=lyZQPjUT5B4
Enjoy Programing Akita Ruby MeetingͰࢀՃऀΛ͓ͪͯ͠ ͓Γ·͢ɻ