docs: update containers API docs

This commit is contained in:
2026-03-20 02:35:01 +08:00
parent a647f5e8ec
commit 0c073db4e8
33 changed files with 135 additions and 56 deletions

View File

@@ -11,7 +11,13 @@ bool Erase(const Key& key);
**返回:** 如果元素被删除返回 `true`,如果键不存在返回 `false`
**复杂度:** O(1) 平均,最坏 O(n)
**复杂度:** O(1) 平均,最坏 O(n)(同一桶中有多个键发生哈希冲突)
**线程安全:** ❌ 非线程安全
**异常:**
**实现备注:** 使用 swap-with-last 策略,将待删除元素与桶内最后一个元素交换,然后 popBack避免数组元素批量移动。
**示例:**