refactor: update the hash_map_open_addressing rust codes to synchronize with java (#787)

This commit is contained in:
易春风
2023-09-24 16:16:06 +08:00
committed by GitHub
parent a6a1036dc9
commit 4b5e21d0d9
2 changed files with 82 additions and 89 deletions
+1 -2
View File
@@ -4,13 +4,12 @@
* Author: xBLACICEx (xBLACKICEx@outlook.com)
*/
#[derive(Debug, Clone)]
/* 键值对 */
#[derive(Debug, Clone, PartialEq)]
pub struct Pair {
pub key: i32,
pub val: String,
}
/* 基于数组简易实现的哈希表 */
pub struct ArrayHashMap {
buckets: Vec<Option<Pair>>