mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-11 06:56:06 +00:00
refactor: update the hash_map_open_addressing rust codes to synchronize with java (#787)
This commit is contained in:
@@ -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>>
|
||||
|
||||
Reference in New Issue
Block a user