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
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
TestingOsaka6_Ozono
o3
0
280
AIエージェントの設計で注意するべきポイント6選
har1101
6
3.2k
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
370
Patterns of Patterns
denyspoltorak
0
770
余白を設計しフロントエンド開発を 加速させる
tsukuha
5
1.3k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
260
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.6k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.6k
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2k
CSC307 Lecture 04
javiergs
PRO
0
640
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
670
はじめてのカスタムエージェント【GitHub Copilot Agent Mode編】
satoshi256kbyte
0
190
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
140
Code Reviewing Like a Champion
maltzj
527
40k
Writing Fast Ruby
sferik
630
62k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
69
Bash Introduction
62gerente
615
210k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Claude Code のすすめ
schroneko
67
210k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The untapped power of vector embeddings
frankvandijk
1
1.5k
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