C++ Hash Function

Asked 2 years ago, Updated 2 years ago, 22 views

Implementing Dynamic Hash on C++.

value = hash_function(key) ; That's what I know.
key is the attributes (for example, Student ID) to classify Dynamic Hash, and

I understand that value is the block number where records with the key will be stored.

Is that right??

My question is, is there a standard library available for reading and storing files in the Block Number specified in C++?

c++

2022-09-22 12:57

1 Answers

The hash data structure is a big issue when a hash result (bucket number) such as the number of buckets comes out.

The prime number is ideal for the number of buckets, but nothing is set.

You can use unordered_map, unordered_set in c++11, but the internal implementation uses a hash data structure, but there is no library responding to the question.

Even if you get it, there is no way that there will be a bucket number and hash function to be created in the heap depending on the input data. It depends on the situation. Eventually, it has to be created and used for purpose, so it has to be implemented according to the project you are working on.

The following is a reference for development.


2022-09-22 12:57

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.