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
Largest Rectangle in Histogram
Search
Lu Dang
September 25, 2016
Technology
0
210
Largest Rectangle in Histogram
http://www.lintcode.com/en/problem/largest-rectangle-in-histogram/
Lu Dang
September 25, 2016
Tweet
Share
Other Decks in Technology
See All in Technology
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
380
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
110
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
130
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
560
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
180
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
330
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.4k
Tebiki Engineering Team Deck
tebiki
0
24k
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
440
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
640
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
430
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
220
Featured
See All Featured
Optimizing for Happiness
mojombo
379
71k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Writing Fast Ruby
sferik
630
62k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
The Spectacular Lies of Maps
axbom
PRO
1
520
30 Presentation Tips
portentint
PRO
1
210
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Navigating Team Friction
lara
192
16k
Practical Orchestrator
shlominoach
191
11k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Transcript
2 1 5 6 2 3 0 positions heights 0
2 maxVal = 0 i == 0
2 1 5 6 2 3 0 positions heights 0
2 maxVal = 0 i == 1
2 1 5 6 2 3 0 positions heights i
== 1 maxVal = max(0, (i - 0) * 2) = 2 2
2 1 5 6 2 3 0 positions heights 0
1 i == 1 maxVal = max(0, (i - 0) * 2) = 2
2 1 5 6 2 3 0 positions heights 0
1 maxVal = 2 i == 2 2 5
2 1 5 6 2 3 0 positions heights 0
1 maxVal = 2 i == 3 2 5 3 6
2 1 5 6 2 3 0 positions heights 0
1 maxVal = 2 i == 4 2 5 3 6
2 1 5 6 2 3 0 positions heights 0
1 maxVal = max(2, (i - 3) * 6) = 6 i == 4 2 5 6
2 1 5 6 2 3 0 positions heights 0
1 maxVal = max(6, (i - 2) * 5) = 10 i == 4 10
2 1 5 6 2 3 0 positions heights 0
1 maxVal = 10 i == 4 2 2
2 1 5 6 2 3 0 positions heights 0
1 maxVal = 10 i == 5 2 2 5 3
2 1 5 6 2 3 0 positions heights 0
1 maxVal = 10 i == 6 2 2 5 3
2 1 5 6 2 3 0 positions heights 0
1 maxVal = max(10, (i - 5) * 3) = 10 i == 6 2 2 3
2 1 5 6 2 3 0 positions heights 0
1 maxVal = max(10, (i - 2) * 2) = 10 i == 6 8
2 1 5 6 2 3 0 positions heights maxVal
= max(10, (i - 0) * 1) = 10 i == 6 6
“maxVal is 10.” 2 1 5 6 2 3 0
10