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
42tokyo-push_swap-data_structure
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
love42
February 23, 2023
Programming
380
0
Share
42tokyo-push_swap-data_structure
love42
February 23, 2023
More Decks by love42
See All by love42
42Tokyo-push_swap
love42
0
2.8k
[42tokyo]forest-green_MTG#5
love42
0
65
Other Decks in Programming
See All in Programming
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
260
書き換えて学ぶTemporal #fukts
pirosikick
2
360
Road to RubyKaigi: Play Hard(ware)
makicamel
1
550
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.6k
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
350
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
140
AIを導入する前にやるべきこと
negima
2
340
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
22
11k
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
140
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.6k
Explore CoroutineScope
tomoeng11
0
170
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
140
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
Optimizing for Happiness
mojombo
378
71k
4 Signs Your Business is Dying
shpigford
187
22k
A Soul's Torment
seathinner
6
2.8k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
280
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
790
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
240
Being A Developer After 40
akosma
91
590k
The Invisible Side of Design
smashingmag
302
52k
Transcript
PUSH_SWAP PUSH_SWAP
push_swap
push_swap
1. 2. 3.
None
None
None
None
( ) ...
None
LOOP
None
3 6 4 2 5 1 a[0] a[1] a[2] a[3]
a[4] a[5] stack A malloc ./push_swap 3 6 4 2 5 1
6 4 5 a[0] a[1] a[2] a[3] a[4] a[5] 3
2 1 b[0] b[1] b[2] b[3] b[4] b[5] stack A stack B malloc B
None
push / rotate
push 3 4 5 6 a[0] a[1] a[2] a[3] a[4]
a[5] 2 1 b[0] b[1] b[2] b[3] b[4] b[5] stack A stack B push stack A push stack B pa
push / rotate LOOP
None
A F NULL B C D E
3 b 1 NULL 6 c 4 d 2 e
5 f ./push_swap 3 6 4 2 5 1 a b c d e f malloc malloc malloc malloc malloc malloc t_list t_node head num next
None
push 1 NULL stack A stack B 3 c 6
NULL 4 e 2 f 5 b a b c d e head : a head : d f pa
push 1 NULL stack A stack B 3 c 6
NULL 4 e 2 a 5 b a b c d e f head : d head : f f
None
rotate next
rotate 1 d stack A stack A 3 c 6
d 4 e 2 NULL 5 b a b c d e head : a head : d f rra 1 NULL 3 c 6 d 4 e 5 b a b c e f 2 a d
rotate LOOP
None
None
None
NULL 1 6 NULL 2 3 4 5
NULL 3 b e 1 NULL a 6 c b
4 d c 2 e d 5 f ./push_swap 3 6 4 2 5 1 a b c d e f malloc malloc malloc malloc malloc malloc t_list t_node head tail num next prev
rotate NULL 3 c b 1 d e 6 f
a 4 e f 2 NULL c 5 b a b c d e f d 3 c b 1 NULL e 6 f a 4 e NULL 2 a c 5 b a b c d e f stack A stack A head : a tail : d head : d tail : f rra tail -> prev
LOOP
None
( ...) " "
None
None