Minimum Time Difference - #160
Open
tom4649 wants to merge 2 commits into
Open
Conversation
oda
reviewed
Aug 16, 2026
|
|
||
| https://leetcode.com/problems/minimum-time-difference/editorial/?envType=problem-list-v2&envId=7p55wqm | ||
|
|
||
| バケットソート。全く思いつかなかった。ソート対象の値が限られているときにバケットソートが使えることを覚えておきたい。 |
There was a problem hiding this comment.
Python だと書きにくいですが、木構造も一つで C++ の lower_bound upper_bound もありかと思いました。
Python なら sortedcontainers ですかね。
Owner
Author
There was a problem hiding this comment.
この管理方法はストリーミング処理に適していそうですね。
sortedcontainers 知らなかったので勉強になりました。
There was a problem hiding this comment.
バケットソートも、木構造の分岐が一段で大きさが固定なものという感じなので、そんなに距離はないですね。
Owner
Author
There was a problem hiding this comment.
なるほど、バケットソートが一段の木構造という視点はありませんでした。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://leetcode.com/problems/minimum-time-difference/description/?envType=problem-list-v2&envId=7p55wqm