Skip to content

Commit a0ed3ba

Browse files
v0.6
1 parent 42f2e5f commit a0ed3ba

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

‎Lesson03/Exercise01/1.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class hash_map
99
public:
1010
hash_map(size_t n)
1111
{
12-
data = std::vector(n, -1);
12+
data = std::vector<int>(n, -1);
1313
}
1414

1515
void insert(uint value)

‎Lesson03/Exercise03/3.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class hash_map
2020
public:
2121
hash_map(int n) : size(n)
2222
{
23-
data1 = std::vector(size, -1);
24-
data2 = std::vector(size, -1);
23+
data1 = std::vector<int>(size, -1);
24+
data2 = std::vector<int>(size, -1);
2525
}
2626

2727
std::vector<int>::iterator lookup(int key)

‎Lesson03/Exercise05/5.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ class bloom_filter
1717
case 2:
1818
return (key / 11) % nBits;
1919
}
20+
return 0;
2021
}
2122

2223
public:
2324
bloom_filter(int n) : nBits(n)
2425
{
25-
data = std::vector(nBits, false);
26+
data = std::vector<bool>(nBits, false);
2627
}
2728

2829
void lookup(int key)

0 commit comments

Comments
 (0)