Re:Show HN: Refurb – A tool for refurbishing and modernizing...
by BeetleB on Wednesday September 28, 2022 @11:00AM
(#33008774)
Set insertion is O(1). This isn't C++.
[ Parent
| on HN ]
Re:Show HN: Refurb – A tool for refurbishing and modernizing...
by minhazm on Wednesday September 28, 2022 @01:26PM
(#33010621)
I didn't claim it wasn't O(1). I just said that for sets to automatically be sorted like the parent comment claimed, it would have to be O(logn) insertion since that's the fastest you can insert into a sorted data structure. Obviously sets are not sorted, and thus are able to maintain O(1) insertion.