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.8k
[42tokyo]forest-green_MTG#5
love42
0
62
Other Decks in Programming
See All in Programming
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
220
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
3
380
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
420
AIプロダクト時代のQAエンジニアに求められること
imtnd
1
520
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
490
Oxlint JS plugins
kazupon
1
1.2k
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
230
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
190
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
1
370
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
GitHub's CSS Performance
jonrohan
1032
470k
Code Review Best Practice
trishagee
74
20k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Designing for Timeless Needs
cassininazir
0
150
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Git: the NoSQL Database
bkeepers
PRO
432
66k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
360
[SF Ruby Conf 2025] Rails X
palkan
2
800
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
97
Tell your own story through comics
letsgokoyo
1
830
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