Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
42tokyo-push_swap-data_structure
Search
love42
February 23, 2023
Programming
0
360
42tokyo-push_swap-data_structure
love42
February 23, 2023
Tweet
Share
More Decks by love42
See All by love42
42Tokyo-push_swap
love42
0
2.7k
[42tokyo]forest-green_MTG#5
love42
0
61
Other Decks in Programming
See All in Programming
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
140
tparseでgo testの出力を見やすくする
utgwkk
2
270
エディターってAIで操作できるんだぜ
kis9a
0
750
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
610
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.7k
ゆくKotlin くるRust
exoego
1
150
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
Deno Tunnel を使ってみた話
kamekyame
0
230
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
210
これならできる!個人開発のすゝめ
tinykitten
PRO
0
130
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
630
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
280
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
7.8k
4 Signs Your Business is Dying
shpigford
186
22k
Scaling GitHub
holman
464
140k
The Invisible Side of Design
smashingmag
302
51k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
AI: The stuff that nobody shows you
jnunemaker
PRO
1
12
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
16
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
2
2.8k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
100
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
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