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
THE FIRST CODE 寝てたら終わるスリープソート
Search
Satoru Takeuchi
PRO
September 07, 2022
Technology
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
THE FIRST CODE 寝てたら終わるスリープソート
以下動画のテキストです。
https://youtu.be/PSeIEBPnq-E
Satoru Takeuchi
PRO
September 07, 2022
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
76
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
100
あなたの知らないバージョン命名規則
sat
PRO
3
920
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
70
Machine Check Exception
sat
PRO
2
68
バイナリダンプの模様を読む
sat
PRO
0
110
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
100
114-ファイルのshallow_copy.pdf
sat
PRO
2
59
113-Btrfsのスナップショット.pdf
sat
PRO
0
43
Other Decks in Technology
See All in Technology
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
150
Codex概要
ymiya55
0
430
予測不能な実行エージェントを安全にサクッと試せるサンドボックス環境の話
sansantech
PRO
0
130
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
820
MCPゲートウェイを作って運用してわかったこと — Agent時代の権限管理の現在地
mtpooh
10
3.2k
生成AIと進める探索的データ分析(2026.10.03 第122回Tokyo.R勉強会)
tatamiya
2
1.4k
サーバーフルコンピューティング?AWS Lambda
iwatatomoya
1
270
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
280
AI Made Us Faster at Solving the Wrong Problems
marceloancelmo
0
170
インバスケット試験対策アプリを 作って見えたAIエージェント構築 ナレッジ2選
shichijoyuhi
1
130
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
510
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
850
Building Flexible Design Systems
yeseniaperezcruz
330
41k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
620
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
570
RailsConf 2023
tenderlove
30
1.6k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
520
ラッコキーワード サービス紹介資料
rakko
1
5.2M
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
390
Side Projects
sachag
456
43k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
350
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
350
Transcript
THE FIRST CODE ~ 寝てたら終わる スリープソート~ Aug. 20th, 2022 Satoru
Takeuchi twitter: satoru_takeuchi
THE FIRST CODE • 一発撮りコーディング動画 • お題に沿ってプログラムを書く • 一回実行したらビルドエラーが起きようとバグがあろうと終了
お題 • n個の正の整数(n>=1)の配列aが与えられる • a[0]<=a[1]<=...a[n-1]になるように並びかえる • sleep sortを使う(後述) • 以下の入力を正しくソートできたら勝ちとする
◦ [1]=>[1] ◦ [2,1]=>[1,2] ◦ [5,4,2,3,1]=>[1,2,3,4,5] ◦ [2,1,1,2]=>[1,1,2,2]
sleep sortとは? • 全要素について… ◦ n秒sleep ◦ 起きたら結果を格納する配列の先頭に自分自身の値を入れる • 全要素について上記処理が終わればソート完了
では開始 • n個の正の整数(n>=1)の配列aが与えられる • a[0]<=a[1]<=...a[n-1]になるように並びかえる • sleep sortを使う(後述) • 以下の入力を正しくソートできたら勝ちとする
◦ [1]=>[1] ◦ [2,1]=>[1,2] ◦ [5,4,2,3,1]=>[1,2,3,4,5] ◦ [2,1,1,2]=>[1,1,2,2] • 動画を見ていてバグをみつけたらおしえてください