Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
42tokyo-push_swap-data_structure
Search
love42
February 23, 2023
Programming
390
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
66
Other Decks in Programming
See All in Programming
What We Talk About When We Talk About XP
m_seki
2
450
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
150
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
160
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
スマート反転とウェブアクセシビリティ
camiha
0
180
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
150
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
120
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
130
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
130
App Intentsのビルドプロセスを支える技術
kntkymt
0
190
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
110
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Faster Mobile Websites
deanohume
310
32k
Amusing Abliteration
ianozsvald
1
290
Navigating Weather and Climate Data
rabernat
0
510
A designer walks into a library…
pauljervisheath
211
25k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Heart Work Chapter 1 - Part 1
lfama
PRO
9
36k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
490
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Navigating Team Friction
lara
192
16k
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