feat: add Swift codes for hash_collision article (#569)

* feat: add Swift codes for hash_collision article

* refactor: extract common Pair

* Update hash_map.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
nuomi1
2023-07-01 20:39:55 +08:00
committed by GitHub
parent 69920a0599
commit 7f8b0fff54
6 changed files with 335 additions and 12 deletions
@@ -4,16 +4,7 @@
* Author: nuomi1 (nuomi1@qq.com)
*/
/* */
class Pair {
var key: Int
var val: String
init(key: Int, val: String) {
self.key = key
self.val = val
}
}
import utils
/* */
class ArrayHashMap {