$30 off During Our Annual Pro Sale. View Details »
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
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
200
認証・認可の基本を学ぼう後編
kouyuume
0
250
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
130
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
450
ゆくKotlin くるRust
exoego
1
160
Deno Tunnel を使ってみた話
kamekyame
0
260
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
190
Vibe codingでおすすめの言語と開発手法
uyuki234
0
130
マスタデータ問題、マイクロサービスでどう解くか
kts
0
140
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.4k
愛される翻訳の秘訣
kishikawakatsumi
3
350
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
400
BBQ
matthewcrist
89
9.9k
The Limits of Empathy - UXLibs8
cassininazir
1
190
How to Think Like a Performance Engineer
csswizardry
28
2.4k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.3k
Become a Pro
speakerdeck
PRO
31
5.7k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
300
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
870
How to train your dragon (web standard)
notwaldorf
97
6.5k
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
380
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