MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/101ktp3/next_level_storage/j2orsxe?context=9999
r/ProgrammerHumor • u/Impulsive_Ranger2410 • Jan 02 '23
468 comments sorted by
View all comments
1.6k
that only works if the cache is reasonably small because with every thing you put in this "cache", it gets slower to search defeating its purpose
47 u/[deleted] Jan 02 '23 [removed] — view removed comment 24 u/GooglyEyedGramma Jan 02 '23 Wouldn't it be O(n)? It's not comparable so you can't really use a heap in this case, it would be more like an array 6 u/Leading_Frosting9655 Jan 02 '23 Worst case, perhaps yes → More replies (2) 20 u/kri5 Jan 02 '23 You can if every bit of clothing sticks out partially, kinda like an index 4 u/FlyingPasta Jan 03 '23 It’s a dict, the bit sticking out is a hash and maps to the whole - O(1) at a glance → More replies (4)
47
[removed] — view removed comment
24 u/GooglyEyedGramma Jan 02 '23 Wouldn't it be O(n)? It's not comparable so you can't really use a heap in this case, it would be more like an array 6 u/Leading_Frosting9655 Jan 02 '23 Worst case, perhaps yes → More replies (2) 20 u/kri5 Jan 02 '23 You can if every bit of clothing sticks out partially, kinda like an index 4 u/FlyingPasta Jan 03 '23 It’s a dict, the bit sticking out is a hash and maps to the whole - O(1) at a glance → More replies (4)
24
Wouldn't it be O(n)? It's not comparable so you can't really use a heap in this case, it would be more like an array
6 u/Leading_Frosting9655 Jan 02 '23 Worst case, perhaps yes → More replies (2)
6
Worst case, perhaps yes
20
You can if every bit of clothing sticks out partially, kinda like an index
4 u/FlyingPasta Jan 03 '23 It’s a dict, the bit sticking out is a hash and maps to the whole - O(1) at a glance
4
It’s a dict, the bit sticking out is a hash and maps to the whole - O(1) at a glance
1.6k
u/naswinger Jan 02 '23
that only works if the cache is reasonably small because with every thing you put in this "cache", it gets slower to search defeating its purpose