Format C, C++, C#, Go, Java, Python, Rust code.

This commit is contained in:
krahets
2023-09-02 23:54:38 +08:00
parent b6ac6aa7d7
commit dd72335235
53 changed files with 152 additions and 154 deletions

View File

@@ -20,7 +20,7 @@ class HashMapChaining {
HashMapChaining() : size(0), capacity(4), loadThres(2.0 / 3), extendRatio(2) {
buckets.resize(capacity);
}
/* 析构方法 */
~HashMapChaining() {
for (auto &bucket : buckets) {

View File

@@ -31,7 +31,7 @@ int xorHash(string key) {
int hash = 0;
const int MODULUS = 1000000007;
for (unsigned char c : key) {
cout<<(int)c<<endl;
cout << (int)c << endl;
hash ^= (int)c;
}
return hash & MODULUS;