【发布时间】:2025-12-07 08:35:01
【问题描述】:
标题几乎就是问题所在。 Python 的内置 Counter 是哈希映射吗? Counter 中的 get() 和 put() 是否具有 O(1) 的时间复杂度?
【问题讨论】:
-
是的,它是一个 dict 子类。
-
是的,是
dict
标签: python time-complexity counter
标题几乎就是问题所在。 Python 的内置 Counter 是哈希映射吗? Counter 中的 get() 和 put() 是否具有 O(1) 的时间复杂度?
【问题讨论】:
dict
标签: python time-complexity counter
【讨论】: