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
68
Other Decks in Programming
See All in Programming
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
380
The Rails Doctrine Decade
koic
2
390
FreeBSDでZabbixを動かす
kenkino
0
330
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
360
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
300
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8.6k
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
220
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
220
Agents on Rails - Rails at Scale 2026
irinanazarova
0
260
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
940
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
840
Webの地図
yosuke_furukawa
PRO
6
4.8k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
67k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
440
Building Applications with DynamoDB
mza
96
7.2k
How to train your dragon (web standard)
notwaldorf
97
6.8k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
710
WENDY [Excerpt]
tessaabrams
14
39k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
740
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Making the Leap to Tech Lead
cromwellryan
135
10k
The SEO Collaboration Effect
kristinabergwall1
1
570
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
540
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