Y
Hacker News
new
|
ask
|
show
|
jobs
by
lvass
1633 days ago
It's also trivially solvable in O(1) time using a double-ended queue, but that would deviate from the "algorithm" proposed by the article.