Brent Fischer
Aug 1, 2022

--

"The worst case of the time complexity of get/set in a hash map is O(n)" That is only true for poor implemented hash algorithms, which is not the case for python dicts. It _could_ be a problem for some kind of extremly weird input, but this is pretty unlikely. Python dicts in average have set/get time complexity of O(1) and are therefor pretty fast.

--

--

Brent Fischer
Brent Fischer

Written by Brent Fischer

Python Developer, Python Trainer, Geek, RPGs, Pizza, Traveller. Loves Rust, C, Linux. Drop by at friendlybytes.net

No responses yet